Revert the changes from PR #1044 and #1045 and standardize on Object ** encoding in ptrcall

This commit is contained in:
David Snopek
2023-05-23 15:17:06 -05:00
parent c669f0b78a
commit ad726015e7
8 changed files with 70 additions and 51 deletions

View File

@@ -1887,7 +1887,7 @@ def get_encoded_arg(arg_name, type_name, type_meta):
elif is_engine_class(type_name):
# `{name}` is a C++ wrapper, it contains a field which is the object's pointer Godot expects.
# We have to check `nullptr` because when the caller sends `nullptr`, the wrapper itself will be null.
name = f"({name} != nullptr ? {name}->_owner : nullptr)"
name = f"({name} != nullptr ? &{name}->_owner : nullptr)"
else:
name = f"&{name}"