@@ -16,15 +16,11 @@ cdef class PythonScriptLanguage:
1616 cdef inline void _add_global_constant(self , gd_string_name_t name, gd_variant_t value):
1717 # TODO
1818 spy_log(f" CALLED PythonScriptLanguage::_add_global_constant(name={gdapi.gd_string_name_to_pystr(&name)!r}, value={value!r})" )
19- gd_string_name_del(& name)
20- gd_variant_del(& value)
2119
2220 # godot_extension: method(virtual=True)
2321 cdef inline void _add_named_global_constant(self , gd_string_name_t name, gd_variant_t value):
2422 # TODO
2523 spy_log(f" CALLED PythonScriptLanguage::_add_named_global_constant(name={gdapi.gd_string_name_to_pystr(&name)!r}, value={value!r})" )
26- gd_string_name_del(& name)
27- gd_variant_del(& value)
2824
2925 # godot_extension: method(virtual=True, const=True)
3026 cdef inline gd_string_t _auto_indent_code(self , gd_string_t code, gd_int_t from_line, gd_int_t to_line):
@@ -48,9 +44,6 @@ cdef class PythonScriptLanguage:
4844 # TODO
4945 spy_log(f" CALLED PythonScriptLanguage::_complete_code(code={gdapi.gd_string_to_pystr(&code)!r}, path={gdapi.gd_string_to_pystr(&path)!r}, owner=<object 0x{<size_t>owner:x}>)" )
5046 cdef gd_dictionary_t ret = gd_dictionary_new()
51- gd_string_del(& code)
52- gd_string_del(& path)
53- # `gd_object_t` doesn't need to be be deleted (is it just a raw pointer)
5447 return ret
5548
5649 # godot_extension: method(virtual=True, const=True)
@@ -133,8 +126,6 @@ cdef class PythonScriptLanguage:
133126 spy_log(f" CALLED PythonScriptLanguage::_find_function(function={gdapi.gd_string_to_pystr(&function)!r}, code={gdapi.gd_string_to_pystr(&code)!r})" )
134127 cdef object py_function = gdapi.gd_string_to_pystr(& function)
135128 cdef object py_code = gdapi.gd_string_to_pystr(& code)
136- gd_string_del(& function)
137- gd_string_del(& code)
138129
139130 # Simple search for function definition
140131 try :
@@ -164,7 +155,6 @@ cdef class PythonScriptLanguage:
164155 cdef inline gd_array_t _get_built_in_templates(self , gd_string_name_t object ):
165156 # TODO
166157 spy_log(f" CALLED PythonScriptLanguage::(object={gdapi.gd_string_name_to_pystr(&object)!r})" )
167- gd_string_name_del(& object )
168158 cdef gd_array_t ret = gd_array_new()
169159 return ret
170160
@@ -203,7 +193,6 @@ cdef class PythonScriptLanguage:
203193 cdef inline gd_dictionary_t _get_global_class_name(self , gd_string_t path):
204194 # TODO
205195 spy_log(f" CALLED PythonScriptLanguage::_get_global(path={gdapi.gd_string_to_pystr(&path)!r})" )
206- gd_string_del(& path)
207196 cdef gd_dictionary_t ret = gd_dictionary_new()
208197 return ret
209198
@@ -316,7 +305,6 @@ cdef class PythonScriptLanguage:
316305 spy_log(f" CALLED PythonScriptLanguage::_handles_global_class_type(type={gdapi.gd_string_to_pystr(&type)!r})" )
317306 # TODO: would be more efficient to precompute the type into a `gd_string_t`
318307 cdef gd_bool_t result = gdapi.gd_string_to_pystr(& type ) == " Python"
319- gd_string_del(& type )
320308 return result
321309
322310 # godot_extension: method(virtual=True, const=True)
@@ -349,7 +337,6 @@ cdef class PythonScriptLanguage:
349337 " when" ,
350338 " while" ,
351339 )
352- gd_string_del(& keyword)
353340 return result
354341
355342 # godot_extension: method(virtual=True)
@@ -361,10 +348,6 @@ cdef class PythonScriptLanguage:
361348 cdef inline gd_dictionary_t _lookup_code(self , gd_string_t code, gd_string_t symbol, gd_string_t path, gd_object_t owner):
362349 # TODO
363350 spy_log(f" CALLED PythonScriptLanguage::_lookup_code(code={gdapi.gd_string_to_pystr(&code)!r}, symbol={gdapi.gd_string_to_pystr(&symbol)!r}, path={gdapi.gd_string_to_pystr(&path)!r}, owner=<object 0x{<size_t>owner:x}>)" )
364- gd_string_del(& code)
365- gd_string_del(& symbol)
366- gd_string_del(& path)
367- # `gd_object_t` doesn't need to be be deleted (is it just a raw pointer)
368351 cdef gd_dictionary_t ret = gd_dictionary_new()
369352 return ret
370353
@@ -373,8 +356,6 @@ cdef class PythonScriptLanguage:
373356 spy_log(f" CALLED PythonScriptLanguage::_make_function(class_name={gdapi.gd_string_to_pystr(&class_name)!r}, function_name={gdapi.gd_string_to_pystr(&function_name)!r}, function_args={function_args!r})" )
374357 cdef object py_class_name = gdapi.gd_string_to_pystr(& class_name)
375358 cdef object py_function_name = gdapi.gd_string_to_pystr(& function_name)
376- gd_string_del(& class_name)
377- gd_string_del(& function_name)
378359
379360 # Convert function arguments
380361 cdef object args = []
@@ -385,7 +366,6 @@ cdef class PythonScriptLanguage:
385366 arg_str = gd_packed_string_array_indexed_getter(& function_args, i)
386367 args.append(gdapi.gd_string_to_pystr(& arg_str))
387368 gd_string_del(& arg_str)
388- gd_packed_string_array_del(& function_args)
389369
390370 # Create function signature
391371 cdef object arg_list = ' , ' .join([' self' ] + args) if args else ' self'
@@ -399,9 +379,6 @@ cdef class PythonScriptLanguage:
399379 cdef object py_template = gdapi.gd_string_to_pystr(& template)
400380 cdef object py_class_name = gdapi.gd_string_to_pystr(& class_name)
401381 cdef object py_base_class_name = gdapi.gd_string_to_pystr(& base_class_name)
402- gd_string_del(& template)
403- gd_string_del(& class_name)
404- gd_string_del(& base_class_name)
405382
406383 # Create a basic Python script template
407384 cdef object source_template = f''' extends {py_base_class_name}
@@ -427,7 +404,6 @@ class {py_class_name}({py_base_class_name}):
427404 cdef inline gd_int_t _open_in_external_editor(self , gd_object_t script, gd_int_t line, gd_int_t column):
428405 # TODO
429406 spy_log(f" CALLED PythonScriptLanguage::_open_in_external_editor(script=<object 0x{<size_t>script:x}>, line={line}, column={column})" )
430- # `gd_object_t` doesn't need to be be deleted (is it just a raw pointer)
431407 return Error.ERR_UNAVAILABLE
432408
433409 # godot_extension: method(virtual=True)
@@ -479,19 +455,16 @@ class {py_class_name}({py_base_class_name}):
479455 cdef inline void _reload_scripts(self , gd_array_t scripts, gd_bool_t soft_reload):
480456 # TODO
481457 spy_log(f" CALLED PythonScriptLanguage::_reload_scripts(scripts={scripts!r}, soft_reload={soft_reload})" )
482- gd_array_del(& scripts)
483458
484459 # godot_extension: method(virtual=True)
485460 cdef inline void _reload_tool_script(self , gd_object_t script, gd_bool_t soft_reload):
486461 # TODO
487462 spy_log(f" CALLED PythonScriptLanguage::_reload_tool_script(script=<object 0x{<size_t>script:x}>, soft_reload={soft_reload})" )
488- # `gd_object_t` doesn't need to be be deleted (is it just a raw pointer)
489463
490464 # godot_extension: method(virtual=True)
491465 cdef inline void _remove_named_global_constant(self , gd_string_name_t name):
492466 # TODO
493467 spy_log(f" CALLED PythonScriptLanguage::_remove_named_global_constant(name={gdapi.gd_string_name_to_pystr(&name)!r})" )
494- gd_string_name_del(& name)
495468
496469 # godot_extension: method(virtual=True, const=True)
497470 cdef inline gd_bool_t _supports_builtin_mode(self ):
@@ -519,16 +492,13 @@ class {py_class_name}({py_base_class_name}):
519492 # TODO
520493 spy_log(f" CALLED PythonScriptLanguage::_validate(script={gdapi.gd_string_to_pystr(&script)!r}, path={gdapi.gd_string_to_pystr(&path)!r}, validate_functions={validate_functions}, validate_errors={validate_errors}, validate_warnings={validate_warnings}, validate_safe_lines={validate_safe_lines})" )
521494 cdef gd_dictionary_t ret = gd_dictionary_new()
522- gd_string_del(& script)
523- gd_string_del(& path)
524495 return ret
525496
526497 # godot_extension: method(virtual=True, const=True)
527498 cdef inline gd_string_t _validate_path(self , gd_string_t path):
528499 # TODO
529500 spy_log(f" CALLED PythonScriptLanguage::_validate_path(path={gdapi.gd_string_to_pystr(&path)!r})" )
530501 cdef gd_string_t ret = gd_string_from_pybytes(b" " )
531- gd_string_del(& path)
532502 return ret
533503
534504 # godot_extension: generate_class_code()
0 commit comments