2005-01-31 Mike Kestner <mkestner@novell.com>

* generator/SymbolTable.cs : handle unsigned-*.
	* parser/gapi2xml.pl : handle const unsigned * parameters. Also fix
	a G_GNUC_PRINTF parsing bug exposed by a GMime.
	* */*-api.raw : regen.
	[Fixes #71825]


svn path=/trunk/gtk-sharp/; revision=39851
This commit is contained in:
Mike Kestner 2005-01-31 15:23:41 +00:00
parent 7c91483373
commit 31a6de44ca
4 changed files with 15 additions and 3 deletions

View File

@ -1,3 +1,11 @@
2005-01-31 Mike Kestner <mkestner@novell.com>
* generator/SymbolTable.cs : handle unsigned-*.
* parser/gapi2xml.pl : handle const unsigned * parameters. Also fix
a G_GNUC_PRINTF parsing bug exposed by a GMime.
* */*-api.raw : regen.
[Fixes #71825]
2005-01-28 Mike Kestner <mkestner@novell.com>
* generator/ReturnValue.cs : use ToNativeReturnType for ToNativeType

View File

@ -50,11 +50,13 @@ namespace GtkSharp.Generation {
AddType (new SimpleGen ("guint", "uint"));
AddType (new SimpleGen ("int", "int"));
AddType (new SimpleGen ("unsigned int", "uint"));
AddType (new SimpleGen ("unsigned-int", "uint"));
AddType (new SimpleGen ("gshort", "short"));
AddType (new SimpleGen ("gushort", "ushort"));
AddType (new SimpleGen ("short", "short"));
AddType (new SimpleGen ("guchar", "byte"));
AddType (new SimpleGen ("unsigned char", "byte"));
AddType (new SimpleGen ("unsigned-char", "byte"));
AddType (new SimpleGen ("guint1", "bool"));
AddType (new SimpleGen ("uint1", "bool"));
AddType (new SimpleGen ("gint8", "sbyte"));

View File

@ -1163,7 +1163,7 @@
<method name="Grab" cname="gnome_canvas_item_grab">
<return-type type="int"/>
<parameters>
<parameter type="unsigned int" name="event_mask"/>
<parameter type="unsigned-int" name="event_mask"/>
<parameter type="GdkCursor*" name="cursor"/>
<parameter type="guint32" name="etime"/>
</parameters>

View File

@ -619,8 +619,9 @@ sub parseParms
$fmt = $1; $args = $2;
($params_el, @junk) = $el->getElementsByTagName ("parameters");
(@params) = $params_el->getElementsByTagName ("parameter");
$params[$fmt-1]->setAttribute ("printf_format", "true");
$params[$args-1]->setAttribute ("printf_format_args", "true");
$offset = 1 + $drop_1st;
$params[$fmt-$offset]->setAttribute ("printf_format", "true");
$params[$args-$offset]->setAttribute ("printf_format_args", "true");
}
}
}
@ -754,6 +755,7 @@ sub addParamsElem
$parm =~ s/(\w+)\s+const /const \1 /g;
$parm =~ s/(\*+)\s*const\s+/\1 /g;
$parm =~ s/const\s+/const-/g;
$parm =~ s/unsigned\s+/unsigned-/g;
if ($parm =~ /(.*)\(\s*\**\s*(\w+)\)\s+\((.*)\)/) {
my $ret = $1; my $cbn = $2; my $params = $3;
$cb_elem = addNameElem($parms_elem, 'callback', $cbn);