mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-29 00:59:20 +00:00
Increment Python object reference count in event handler when the object already exists.
This commit is contained in:
parent
5719dd8e92
commit
5d6f9c0bb5
1 changed files with 2 additions and 0 deletions
|
|
@ -766,6 +766,8 @@ class EventCallbackMethodDefinition(MethodDefinition):
|
|||
""" {get_user_data_code}
|
||||
if (py{name} == NULL) {{
|
||||
{new_from_native_pointer_code}
|
||||
}} else {{
|
||||
Py_INCREF(py{name});
|
||||
}}
|
||||
""".format(name=arg_name, get_user_data_code=get_user_data_code, new_from_native_pointer_code=new_from_native_pointer_code)
|
||||
decref_python_objects_code += "\t\tPy_DECREF(py{name});\n".format(name=arg_name)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue