summaryrefslogtreecommitdiffstats
path: root/bindings/utils.py
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2010-01-28 15:31:58 +0000
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2010-01-28 15:31:58 +0000
commit4912a56b6a70c7a6c485bce2e1fb3072e7ac8018 (patch)
tree3d35658085309acc55f8974a62b22b74e13a8be6 /bindings/utils.py
parent80e61cf6356de74a53db71b638f8b2c9e0bb7247 (diff)
downloadlasso-4912a56b6a70c7a6c485bce2e1fb3072e7ac8018.tar.gz
lasso-4912a56b6a70c7a6c485bce2e1fb3072e7ac8018.tar.xz
lasso-4912a56b6a70c7a6c485bce2e1fb3072e7ac8018.zip
Bindings: add time_t to integer types, add unpointerize method
Diffstat (limited to 'bindings/utils.py')
-rw-r--r--bindings/utils.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bindings/utils.py b/bindings/utils.py
index 16d24069..04662f1f 100644
--- a/bindings/utils.py
+++ b/bindings/utils.py
@@ -200,11 +200,14 @@ def is_boolean(arg):
def is_pointer(arg):
return arg_type(arg).endswith('*')
+def unpointerize(arg):
+ return arg_type(arg).replace('*','')
+
def is_list(arg):
return unconstify(arg_type(arg)).startswith('GList')
def is_int(arg, binding_data):
- return arg_type(arg) in [ 'int', 'gint', 'long', 'glong'] + binding_data.enums
+ return arg_type(arg) in [ 'time_t', 'int', 'gint', 'long', 'glong'] + binding_data.enums
def is_time_t_pointer(arg):
return re.match(r'\btime_t\*', unconstify(arg_type(arg)))