Merge pull request #197 from bruvzg/fix_icall_int64_and_tagbd_reg

Fix ptrcall int size and TagDB registration for classes with "_" in the name.
pull/201/head
Bastiaan Olij 2018-11-19 21:29:03 +11:00 committed by GitHub
commit cec7c2a223
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -541,6 +541,8 @@ def generate_icall_header(icalls):
if is_core_type(arg): if is_core_type(arg):
method_signature += arg + "&" method_signature += arg + "&"
elif arg == "int":
method_signature += "int64_t "
elif arg == "float": elif arg == "float":
method_signature += "double " method_signature += "double "
elif is_primitive(arg): elif is_primitive(arg):
@ -594,6 +596,8 @@ def generate_icall_implementation(icalls):
if is_core_type(arg): if is_core_type(arg):
method_signature += arg + "& " method_signature += arg + "& "
elif arg == "int":
method_signature += "int64_t "
elif arg == "float": elif arg == "float":
method_signature += "double " method_signature += "double "
elif is_primitive(arg): elif is_primitive(arg):
@ -680,7 +684,7 @@ def generate_type_registry(classes):
if base_class_name == "": if base_class_name == "":
base_class_type_hash = "0" base_class_type_hash = "0"
source.append("\tgodot::_TagDB::register_global_type(\"" + class_name + "\", " + class_type_hash + ", " + base_class_type_hash + ");") source.append("\tgodot::_TagDB::register_global_type(\"" + c["name"] + "\", " + class_type_hash + ", " + base_class_type_hash + ");")
source.append("}") source.append("}")