Skip to content

Commit 879f044

Browse files
committed
Improve documentation about hidden Py_INCREF usage in __godot_extension_create_instance
1 parent b97b635 commit 879f044

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

scripts/gdextension_cython_preprocessor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ def __cinit__(self):
111111
cdef GDExtensionObjectPtr __godot_extension_create_instance(void* p_class_userdata) noexcept with gil:
112112
# print("[DEBUG] {spec.class_name}.__godot_extension_create_instance()")
113113
cdef {spec.class_name} obj = {spec.class_name}()
114+
# Note `Py_INCREF(obj)` has already been done during `__cinit__`
114115
return obj._gd_ptr
115116
116117
@staticmethod

0 commit comments

Comments
 (0)