mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-27 07:59:20 +00:00
Fix reference count problem when returning an already existing Python object from the native object user data.
This commit is contained in:
parent
b4978948f9
commit
53c6673032
1 changed files with 1 additions and 1 deletions
|
|
@ -329,7 +329,7 @@ class MethodDefinition:
|
|||
get_user_data_function = return_type_class['class_c_function_prefix'] + "get_user_data"
|
||||
return_from_user_data_code = \
|
||||
"""if ((cresult != NULL) && ({func}(cresult) != NULL)) {{
|
||||
return (PyObject *){func}(cresult);
|
||||
return Py_BuildValue("O", (PyObject *){func}(cresult));
|
||||
}}
|
||||
""".format(func=get_user_data_function)
|
||||
new_from_native_pointer_code = "pyresult = pylinphone_{return_type}_new_from_native_ptr(&pylinphone_{return_type}Type, cresult);\n".format(return_type=stripped_return_type)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue