From 7808c4cffaa5ae606186149d9434380b52e89e7c Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Thu, 4 Feb 2010 22:24:06 +0000 Subject: Bindings: restore ID-WSF constants, improve python getters, * bindings/bindings.py: parse idwsf_strings.h to get ID-WSF constants. * bindings/utils.py: add an is_rc check function, to check for 'error code' return type. * bindings/perl/lang.py: only raise errors for 'int' or 'gint' return type * bindings/python/lang.py: - always create a normal function binding. - for functions starting with 'get' try to create a corresponding property, but if a corresponding member already exists, fails, and print a warning about getter function/member field clash. - make type dispatching on return_type more explicite. --- bindings/utils.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bindings/utils.py') diff --git a/bindings/utils.py b/bindings/utils.py index 50a6314c..7cbfdc89 100644 --- a/bindings/utils.py +++ b/bindings/utils.py @@ -207,6 +207,9 @@ def unpointerize(arg): def is_list(arg): return unconstify(arg_type(arg)).startswith('GList') +def is_rc(arg): + return arg_type(arg) in [ 'int', 'gint' ] + def is_int(arg, binding_data): return arg_type(arg) in [ 'time_t', 'int', 'gint', 'long', 'glong'] + binding_data.enums -- cgit