From 5224c7cf675d6c8b2df9b3f4b43f8cd8d4eb8184 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Mon, 4 Jan 2010 09:13:36 +0000 Subject: Bindings: make the binding infrastructure understand GObject-introspections annotations * bindings/bindings.py * bindings/utils.py: add convenience function to treat arguments tuple: (type,name,{annotations}). introduce new argument options, fix that arguments are 3-tuple of the form (type,name,annotations), where annotations is a dictionary. Key of this dictionnary can be: - optional, wheter the argument is necessary, it means it has a default value. - out, means that the pointer is a pointer of pointer, for bindings that can return exceptions, it will be returned instead of the integer error code, the only way to access error codes will be exceptions. - element-type, contained type of a list or an array, - key-type, value-type, type of respectively the key and value of a GHashTable. - transfer, wheter a the callee(for arguments)/caller(for return values) owns the values passed, it can be none,container(if the callee/caller only owns the container not the contained value) or full. doc.parameters is now a 3-tuple of (attribute-name, attribute-description, attribute-annotations) where attribute-annotations is a string of the form '(option1)(option2 option-arguments) etc.'. - add predicates for xml, list and time_t values. improve predicates for cstring and const modifier. * bindings/overrides.xml: 'out' arguments are not well supported for java, so skip functions using them. * bindings/java/lang.py bindings/php5/php_code.py bindings/php5/wrapper_source.py bindings/python/lang.py: - update language specifig binding generators for handling new annotations. - improve python method declaration, handle optional arguments with default values, factorize this chode in two methods, get_python_arg_decl and defval_to_python_value. * bindings/python/tests/Makefile.am bindings/python/tests/idwsf1_tests.py bindings/python/tests/idwsf2_tests.py: make test work with out of source build dir. --- bindings/python/tests/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bindings/python/tests/Makefile.am') diff --git a/bindings/python/tests/Makefile.am b/bindings/python/tests/Makefile.am index 64dfc090..c2130fb3 100644 --- a/bindings/python/tests/Makefile.am +++ b/bindings/python/tests/Makefile.am @@ -1,6 +1,8 @@ MAINTAINERCLEANFILES = Makefile.in TESTS = # +TESTS_ENVIRONMENT=TOP_SRCDIR=$(top_srcdir) + if PYTHON_ENABLED TESTS += profiles_tests.py binding_tests.py endif -- cgit