Fix "const" NativePtr binds.

This commit is contained in:
bruvzg
2022-02-16 11:35:13 +02:00
parent 9bc489eb2a
commit a8cd21ac07
2 changed files with 25 additions and 21 deletions

View File

@@ -789,6 +789,8 @@ def generate_engine_classes_bindings(api, output_dir, use_template_get_node):
if "arguments" in method:
for argument in method["arguments"]:
type_name = argument["type"]
if type_name.startswith("const "):
type_name = type_name[6:]
if type_name.endswith("*"):
type_name = type_name[:-1]
if is_included(type_name, class_name):
@@ -802,6 +804,8 @@ def generate_engine_classes_bindings(api, output_dir, use_template_get_node):
fully_used_classes.add("Ref")
if "return_value" in method:
type_name = method["return_value"]["type"]
if type_name.startswith("const "):
type_name = type_name[6:]
if type_name.endswith("*"):
type_name = type_name[:-1]
if is_included(type_name, class_name):