From 9d4e51011a785490b7009f9e1db743da86627ad9 Mon Sep 17 00:00:00 2001 From: George Marques Date: Sat, 28 Aug 2021 10:41:50 -0300 Subject: [PATCH] Properly encode numeric POD types --- binding_generator.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/binding_generator.py b/binding_generator.py index 975a29de..b5310372 100644 --- a/binding_generator.py +++ b/binding_generator.py @@ -1334,7 +1334,7 @@ def get_encoded_arg(arg_name, type_name, type_meta): arg_type = correct_type(type_name) if is_pod_type(arg_type): result.append(f"\t{get_gdnative_type(arg_type)} {name}_encoded;") - result.append(f"\tPtrToArg<{correct_type(type_name, type_meta)}>::encode({name}, &{name}_encoded);") + result.append(f"\tPtrToArg<{correct_type(type_name)}>::encode({name}, &{name}_encoded);") name = f"&{name}_encoded" elif is_engine_class(type_name): name = f"{name}->_owner" @@ -1488,6 +1488,11 @@ def is_pod_type(type_name): "int", "float", "bool", + "double", + "int32_t", + "int64_t", + "uint32_t", + "uint64_t", ]