Rewrite some static functions that do not compile with ruby 1.6.
Obtained from: ruby-libart2 Submitted by: bento
This commit is contained in:
parent
eaa8542e8a
commit
28ac6e1ebd
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=77174
1 changed files with 53 additions and 0 deletions
53
graphics/ruby-libart/files/patch-rbart_canvas.c
Normal file
53
graphics/ruby-libart/files/patch-rbart_canvas.c
Normal file
|
@ -0,0 +1,53 @@
|
|||
--- src/rbart_canvas.c.orig Mon Jan 20 01:04:03 2003
|
||||
+++ src/rbart_canvas.c Fri Mar 21 20:06:11 2003
|
||||
@@ -156,6 +156,7 @@
|
||||
return r_self;
|
||||
}
|
||||
|
||||
+#if 0
|
||||
static void
|
||||
user_init_destination(cinfo)
|
||||
j_compress_ptr cinfo;
|
||||
@@ -188,6 +189,42 @@
|
||||
r_buffer = (VALUE) cinfo->client_data;
|
||||
RSTRING(r_buffer)->len = RSTRING(r_buffer)->aux.capa - cinfo->dest->free_in_buffer;
|
||||
RSTRING(r_buffer)->ptr[RSTRING(r_buffer)->len] = '\0';
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+struct client_data {
|
||||
+ VALUE r_result;
|
||||
+ JOCTET buffer[BUFSIZ];
|
||||
+};
|
||||
+
|
||||
+static void
|
||||
+user_init_destination(cinfo)
|
||||
+ j_compress_ptr cinfo;
|
||||
+{
|
||||
+ struct client_data *cd;
|
||||
+ cd = (struct client_data *) cinfo->client_data;
|
||||
+ cinfo->dest->next_output_byte = cd->buffer;
|
||||
+ cinfo->dest->free_in_buffer = BUFSIZ;
|
||||
+}
|
||||
+
|
||||
+static boolean
|
||||
+user_empty_output_buffer(cinfo)
|
||||
+ j_compress_ptr cinfo;
|
||||
+{
|
||||
+ struct client_data *cd;
|
||||
+ cd = (struct client_data *) cinfo->client_data;
|
||||
+ rb_str_cat(cd->r_result, cd->buffer, BUFSIZ);
|
||||
+ cinfo->dest->next_output_byte = cd->buffer;
|
||||
+ cinfo->dest->free_in_buffer = BUFSIZ;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+user_term_destination(cinfo)
|
||||
+ j_compress_ptr cinfo;
|
||||
+{
|
||||
+ struct client_data *cd;
|
||||
+ cd = (struct client_data *) cinfo->client_data;
|
||||
+ rb_str_cat(cd->r_result, cd->buffer, cinfo->dest->next_output_byte - cd->buffer);
|
||||
}
|
||||
|
||||
static VALUE
|
Loading…
Reference in a new issue