mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
Merge pull request #27963 from vrabaud:js
Fix generation when returned class and function are in a namespace
This commit is contained in:
@@ -849,6 +849,10 @@ class JSWrapperGenerator(object):
|
||||
# Register the smart pointer
|
||||
base_class_name = variant.rettype
|
||||
base_class_name = base_class_name.replace("Ptr<","").replace(">","").strip()
|
||||
if base_class_name not in self.classes:
|
||||
new_base_class_name = '%s_%s' % (ns_id, base_class_name)
|
||||
print(base_class_name, ' not found in classes for registering smart pointer using ', new_base_class_name, 'instead')
|
||||
base_class_name = new_base_class_name
|
||||
self.classes[base_class_name].has_smart_ptr = True
|
||||
|
||||
# Adds the external constructor
|
||||
|
||||
Reference in New Issue
Block a user