aboutsummaryrefslogtreecommitdiff
path: root/tools/bindings_generator.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-03-15 10:19:24 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-03-15 10:19:24 -0700
commitf99f825f2b5c0ec52c66f8610bb4c17e5013d305 (patch)
tree30bc927318bf143faea3741cb9bb8891d0b5d8e6 /tools/bindings_generator.py
parente3f438b1088f4da77157d3240d25f4c62a8d0207 (diff)
bindings generator fix
Diffstat (limited to 'tools/bindings_generator.py')
-rwxr-xr-xtools/bindings_generator.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/bindings_generator.py b/tools/bindings_generator.py
index 5f65c82e..3fbff13d 100755
--- a/tools/bindings_generator.py
+++ b/tools/bindings_generator.py
@@ -52,6 +52,10 @@ Notes:
https://github.com/kripken/box2d.js
+ * Functions implemented inline in classes may not be actually
+ compiled into bitcode, unless they are actually used. That may
+ confuse the bindings generator.
+
* C strings (char *) passed to functions are treated in a special way.
If you pass in a pointer, it is assumed to be a pointer and left as
is. Otherwise it must be a JS string, and we convert it to a C
@@ -675,7 +679,7 @@ def generate_class(generating_classname, classname, clazz): # TODO: deprecate ge
clean = clean_type(arg['type'])
if clean in classes:
justargs_fixed[i] += '.ptr'
- elif arg['type'].replace(' ', '') == 'char*':
+ elif arg['type'].replace(' ', '').endswith('char*'):
justargs_fixed[i] = 'ensureString(' + justargs_fixed[i] + ')'
has_string_convs = True