diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-07-26 21:44:26 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-07-26 21:44:26 -0700 |
commit | 84df27af2400c9b2936ceefad9f4db4270bd39cd (patch) | |
tree | 4f737f21c9dc324676c25fd899a9994e5634970c | |
parent | c06c077203db9664201cd7476f80d9292326fb96 (diff) |
optimize bindings generator a little more
-rwxr-xr-x | tools/bindings_generator.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/bindings_generator.py b/tools/bindings_generator.py index 96fb102d..7b778585 100755 --- a/tools/bindings_generator.py +++ b/tools/bindings_generator.py @@ -32,7 +32,7 @@ JS bindings do more serious work, creating class structures in JS and linking them to the C bindings. ''' -import os, sys, glob, re, copy +import os, sys, glob, re abspath = os.path.abspath(os.path.dirname(__file__)) def path_from_root(*pathelems): @@ -110,8 +110,10 @@ for classname, clazz in parsed.classes.iteritems(): if method['name'] not in clazz['final_methods']: clazz['final_methods'][method['name']] = {} - for key in ['name', 'parameters', 'constructor', 'static', 'num_args', 'rtnType', 'destructor', 'pure_virtual']: - clazz['final_methods'][method['name']][key] = copy.deepcopy(method[key]) + for key in ['name', 'constructor', 'static', 'rtnType', 'destructor', 'pure_virtual']: + clazz['final_methods'][method['name']][key] = method[key] + clazz['final_methods'][method['name']]['num_args'] = method['num_args'].copy() + clazz['final_methods'][method['name']]['parameters'] = method['parameters'][:] else: # Merge the new function in the best way we can. Shared arguments must match! |