From b7cf077e3f44677cc889589036e8b0fccf87294f Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Tue, 15 Jul 2014 14:15:44 +0200 Subject: [PATCH] Fix search of *_get_user_data function in the Python wrapper. --- tools/python/apixml2python/linphone.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/python/apixml2python/linphone.py b/tools/python/apixml2python/linphone.py index 86ec90e14..bcba50fc9 100644 --- a/tools/python/apixml2python/linphone.py +++ b/tools/python/apixml2python/linphone.py @@ -153,8 +153,9 @@ class MethodDefinition: if self.return_complete_type != 'void': if self.build_value_format == 'O': stripped_return_type = strip_leading_linphone(self.return_type) - if self.class_['class_has_user_data']: - get_user_data_function = self.__find_class_definition(self.return_type)['class_c_function_prefix'] + "get_user_data" + return_type_class = self.__find_class_definition(self.return_type) + if return_type_class['class_has_user_data']: + get_user_data_function = return_type_class['class_c_function_prefix'] + "get_user_data" self.body += "\tif ((cresult != NULL) && (" + get_user_data_function + "(cresult) != NULL)) {\n" self.body += "\t\treturn (PyObject *)" + get_user_data_function + "(cresult);\n" self.body += "\t}\n"