summaryrefslogtreecommitdiff
path: root/gtk/genmarshal.pl
diff options
context:
space:
mode:
authorElliot Lee <sopwith@src.gnome.org>1998-07-21 16:06:00 +0000
committerElliot Lee <sopwith@src.gnome.org>1998-07-21 16:06:00 +0000
commit5f8748c53e65f96b2b4439aa94fc6c15f92c2c7a (patch)
treefd0986206bc6512c05b92c2d3f2985d6adb5843c /gtk/genmarshal.pl
parentd154bfafd9840653800835057276407dbdbb6b3c (diff)
downloadgtk+-5f8748c53e65f96b2b4439aa94fc6c15f92c2c7a.tar.gz
Marshallers for C_CALLBACK parameters now pass "func, func_data," instead
Marshallers for C_CALLBACK parameters now pass "func, func_data," instead of "func,".
Diffstat (limited to 'gtk/genmarshal.pl')
-rwxr-xr-xgtk/genmarshal.pl21
1 files changed, 16 insertions, 5 deletions
diff --git a/gtk/genmarshal.pl b/gtk/genmarshal.pl
index 43652b3f6c..9fd2491e46 100755
--- a/gtk/genmarshal.pl
+++ b/gtk/genmarshal.pl
@@ -9,9 +9,9 @@
"DOUBLE"=>"gdouble", "STRING"=>"gpointer",
"ENUM"=>"gint", "FLAGS"=>"gint",
"BOXED"=>"gpointer", "FOREIGN"=>"gpointer",
- "CALLBACK"=>"gpointer", "POINTER"=>"gpointer",
+ "C_CALLBACK"=>"C_CALLBACK", "POINTER"=>"gpointer",
"ARGS"=>"gpointer", "SIGNAL"=>"gpointer",
- "C_CALLBACK"=>"gpointer", "OBJECT"=>"gpointer",
+ "OBJECT"=>"gpointer",
"STYLE"=>"gpointer", "GDK_EVENT"=>"gpointer");
$srcdir = $ENV{'srcdir'} || '.';
@@ -98,7 +98,12 @@ EOT
print OS "typedef $trans{$retval} (*GtkSignal_$funcname) (GtkObject *object, \n";
$argn = 1;
for (@params) {
- print OS "$trans{$_} arg".$argn++.",\n" unless $_ eq "NONE";
+ if($_ eq "C_CALLBACK") {
+ print OS "gpointer arg".$argn."a,\n";
+ print OS "gpointer arg".$argn++."b,\n";
+ } else {
+ print OS "$trans{$_} arg".$argn++.",\n" unless $_ eq "NONE";
+ }
}
print OS "gpointer user_data);\n";
@@ -120,8 +125,14 @@ EOT
print OS " (* rfunc) (object,\n";
for($i = 0; $i < (scalar @params); $i++) {
- if ($params[$i] ne "NONE") {
- print OS " GTK_VALUE_$params[$i](args[$i]),\n";
+ if($params[$i] eq "C_CALLBACK") {
+ print OS <<EOT;
+GTK_VALUE_C_CALLBACK(args[$i]).func,
+GTK_VALUE_C_CALLBACK(args[$i]).func_data,
+EOT
+ } elsif ($params[$i] eq "NONE") {
+ } else {
+ print OS " GTK_VALUE_$params[$i](args[$i]),\n";
}
}