mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Remove wrong decrementation of refcount in the event callbacks of the Python wrapper.
This commit is contained in:
parent
46eec72a57
commit
aa05370dce
1 changed files with 1 additions and 4 deletions
|
|
@ -719,7 +719,6 @@ class EventCallbackMethodDefinition(MethodDefinition):
|
|||
|
||||
def format_c_function_call(self):
|
||||
create_python_objects_code = ''
|
||||
decref_python_objects_code = ''
|
||||
fmt = 'O'
|
||||
args = ['pylc']
|
||||
for xml_method_arg in self.xml_method_args:
|
||||
|
|
@ -746,7 +745,6 @@ class EventCallbackMethodDefinition(MethodDefinition):
|
|||
{new_from_native_pointer_code}
|
||||
}}
|
||||
""".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)
|
||||
args=', '.join(args)
|
||||
return \
|
||||
""" if ((func != NULL) && PyCallable_Check(func)) {{
|
||||
|
|
@ -754,9 +752,8 @@ class EventCallbackMethodDefinition(MethodDefinition):
|
|||
if (PyEval_CallObject(func, Py_BuildValue("{fmt}", {args})) == NULL) {{
|
||||
PyErr_Print();
|
||||
}}
|
||||
{decref_python_objects_code}
|
||||
}}
|
||||
""".format(fmt=fmt.replace('O', 'N'), args=args, create_python_objects_code=create_python_objects_code, decref_python_objects_code=decref_python_objects_code)
|
||||
""".format(fmt=fmt.replace('O', 'N'), args=args, create_python_objects_code=create_python_objects_code)
|
||||
|
||||
def format_return_trace(self):
|
||||
return "\tpylinphone_trace(-1, \"[PYLINPHONE] <<< %s\", __FUNCTION__);\n"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue