Bug 557241 – "throws" flag for functions

2008-10-21  Johan Bilien  <jobi@via.ecp.fr>

	Bug 557241 – "throws" flag for functions

	* tests/scanner/drawable-1.0-expected.gir,
	tests/scanner/drawable-injected-1.0-expected.gir,
	tests/scanner/drawable.[ch]: add simple test for throwing
	function (has GError ** as last argument)

	* giscanner/ast.py: add a 'throws' flag to Function
	* giscanner/glibtransformer.py: if a function's last paramerter is
	a GError, set the 'throws' flag and remove that parameter
	* giscanner/girwriter.py: write out the 'throws' attribute
	* giscanner/girparser.py: support parsing the 'throws' attribute

	* tests/repository/gitestthrows.c: add a simple test to check the
	throws flag in a typelib and invoke the function

	* girepository/ginfo.c, girepository/girnode.[ch],
	girepository/girnode.h, girepository/girparser.c,
	girepository/girepository.h: Add and parse the GI_FUNCTION_THROWS flag

	* girepository/ginvoke.c: if a function throws, add a GError as last
	arguments, and propagate the error to the invoker.


svn path=/trunk/; revision=773
This commit is contained in:
Johan Bilien
2008-10-21 17:04:11 +00:00
committed by Johan Bilien
parent c3330c06c7
commit 727bb01805
7 changed files with 43 additions and 6 deletions

View File

@@ -166,11 +166,11 @@ typedef struct
guint16 blob_type; /* 1 */
guint16 deprecated : 1;
guint16 setter : 1;
guint16 setter : 1;
guint16 getter : 1;
guint16 constructor : 1;
guint16 wraps_vfunc : 1;
guint16 reserved : 1;
guint16 throws : 1;
guint16 index :10;
guint32 name;