Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C#: Skip methods with pointer parameters #71535

Merged
merged 1 commit into from
Jan 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions modules/mono/editor/bindings_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2795,6 +2795,18 @@ bool BindingsGenerator::_arg_default_value_is_assignable_to_type(const Variant &
return false;
}

bool method_has_ptr_parameter(MethodInfo p_method_info) {
if (p_method_info.return_val.type == Variant::INT && p_method_info.return_val.hint == PROPERTY_HINT_INT_IS_POINTER) {
return true;
}
for (PropertyInfo arg : p_method_info.arguments) {
if (arg.type == Variant::INT && arg.hint == PROPERTY_HINT_INT_IS_POINTER) {
return true;
}
}
return false;
}

bool BindingsGenerator::_populate_object_type_interfaces() {
obj_types.clear();

Expand Down Expand Up @@ -2938,6 +2950,11 @@ bool BindingsGenerator::_populate_object_type_interfaces() {
continue;
}

if (method_has_ptr_parameter(method_info)) {
// Pointers are not supported.
continue;
}

MethodInterface imethod;
imethod.name = method_info.name;
imethod.cname = cname;
Expand Down