diff options
author | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2010-02-04 22:24:06 +0000 |
---|---|---|
committer | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2010-02-04 22:24:06 +0000 |
commit | 7808c4cffaa5ae606186149d9434380b52e89e7c (patch) | |
tree | e7b2fc0834a5f22b9bfac4539ace162117c23ce6 /bindings/utils.py | |
parent | e6a07df2bc362d57a422216a4af834d980b1b2d7 (diff) | |
download | lasso-7808c4cffaa5ae606186149d9434380b52e89e7c.tar.gz lasso-7808c4cffaa5ae606186149d9434380b52e89e7c.tar.xz lasso-7808c4cffaa5ae606186149d9434380b52e89e7c.zip |
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.
Diffstat (limited to 'bindings/utils.py')
-rw-r--r-- | bindings/utils.py | 3 |
1 files changed, 3 insertions, 0 deletions
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 |