@@ -58,9 +58,7 @@ cdef inline {{ render_utility_function_signature(builtin) }}:
58
58
{# GDExtensionTypePtr ret #}
59
59
{{ "NULL" if builtin.return_type.is_nil else "&__ret" }},
60
60
{# const GDExtensionTypePtr *p_arguments #}
61
- # Cast on args is required given autopxd2 incorrectly removes the const
62
- # attributes when converting gdextension_interface.c to .pxd
63
- <const void *const* >{{ "NULL" if (builtin.arguments | length) == 0 else "__args" }},
61
+ <const void ** >{{ "NULL" if (builtin.arguments | length) == 0 else "__args" }},
64
62
{# int p_argument_count #}
65
63
{{ builtin.arguments | length }}
66
64
)
@@ -77,16 +75,12 @@ cdef inline {{ render_utility_function_signature(builtin) }}:
77
75
{# to pass a `gd_variant_t**` as parameter) whose size is passed in the number #}
78
76
{# of parameters fields... Yes this is very confusing stuff, my brain hurts ! #}
79
77
{% if builtin .return_type .is_nil %}
80
- # Cast on args is required given autopxd2 incorrectly removes the const
81
- # attributes when converting gdextension_interface.c to .pxd
82
- gd_utility_{{ builtin.original_name }}_ptr(NULL, <const void *const* >&args, args_count)
78
+ gd_utility_{{ builtin.original_name }}_ptr(NULL, <const void ** >&args, args_count)
83
79
{% else %}
84
80
cdef gd_variant_t __ret # TODO: improve return type !
85
81
# ptrcall makes us jump right into C++ code (i.e. Godot internals) that expects constructor to be called on each parameter
86
82
__ret = gd_variant_new()
87
- # Cast on args is required given autopxd2 incorrectly removes the const
88
- # attributes when converting gdextension_interface.c to .pxd
89
- gd_utility_{{ builtin.original_name }}_ptr(& __ret, <const void *const* >&args, args_count)
83
+ gd_utility_{{ builtin.original_name }}_ptr(& __ret, <const void ** >&args, args_count)
90
84
return __ret
91
85
{% endif %}
92
86
{% endmacro %}
@@ -167,9 +161,7 @@ cdef inline {{ render_builtin_constructor_signature(builtin, constructor) }}:
167
161
{% endif %}
168
162
{{ builtin.c_name_prefix }}_constructor_{{ constructor.index }}_ptr(
169
163
&obj,
170
- # Cast is required given autopxd2 incorrectly removes the const attributes
171
- # when converting gdextension_interface.c to .pxd
172
- <const void * const* >{{ "NULL" if (constructor.arguments | length) == 0 else "p_args" }}
164
+ <const void ** >{{ "NULL" if (constructor.arguments | length) == 0 else "p_args" }}
173
165
)
174
166
return obj
175
167
{% endmacro %}
@@ -224,9 +216,7 @@ cdef inline {{ render_builtin_method_signature(builtin, meth) }}:
224
216
{# GDExtensionTypePtr p_base #}
225
217
self,
226
218
{# const GDExtensionTypePtr *__args #}
227
- # Cast is required given autopxd2 incorrectly removes the const attributes
228
- # when converting gdextension_interface.c to .pxd
229
- <const void * const* >__args,
219
+ <const void ** >__args,
230
220
{# GDExtensionTypePtr __ret #}
231
221
{{ "NULL" if meth.return_type.is_nil else "&__ret" }},
232
222
{# int p_argument_count #}
0 commit comments