diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-07-27 20:09:45 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-07-27 20:09:45 -0700 |
commit | 71bf54cab67c20031f18136b95a3d902a42ab12b (patch) | |
tree | 80dbe7faf4fbcca0025ec4a167545ababdea629a /tools/bindings_generator.py | |
parent | dfb34c4ddf8d079063e2a3558f1c90cf39e5fa71 (diff) |
implement C++ function hiding in bindings generator
Diffstat (limited to 'tools/bindings_generator.py')
-rwxr-xr-x | tools/bindings_generator.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/bindings_generator.py b/tools/bindings_generator.py index ccea6525..2abc5bf3 100755 --- a/tools/bindings_generator.py +++ b/tools/bindings_generator.py @@ -116,10 +116,14 @@ for classname, clazz in parsed.classes.iteritems(): 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'][:] + clazz['final_methods'][method['name']]['origin'] = subclass else: # Merge the new function in the best way we can. Shared arguments must match! curr = clazz['final_methods'][method['name']] + + if curr['origin'] is not subclass: continue # child class functions mask/hide parent functions of the same name in C++ + if any([curr['parameters'][i]['type'] != method['parameters'][i]['type'] for i in range(min(len(curr['parameters']), len(method['parameters'])))]): print 'Warning: Cannot mix in overloaded functions', method['name'], 'in class', classname, ', skipping' continue |