From 9d15a757234c97f7f42863d3a8d990d03e456191 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Tue, 11 Jul 2017 14:46:39 +0200 Subject: [PATCH] Fixed issue with LinphoneStatus in python wrapper --- tools/python/apixml2python/linphone.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/python/apixml2python/linphone.py b/tools/python/apixml2python/linphone.py index 3ee39ad05..2d878cb86 100644 --- a/tools/python/apixml2python/linphone.py +++ b/tools/python/apixml2python/linphone.py @@ -214,7 +214,7 @@ class ArgumentType: """ self.fmt_str = 'd' self.cfmt_str = '%f' - elif self.basic_type == 'bool_t': + elif self.basic_type == 'bool_t' or self.basic_type == 'LinphoneStatus': self.type_str = 'bool' self.check_condition = "!PyBool_Check({arg_name})" self.convert_code = "{result_name}{result_suffix} = {cast}PyObject_IsTrue({arg_name});\n" @@ -1042,7 +1042,7 @@ class EventCallbackMethodDefinition(MethodDefinition): class LinphoneModule(object): def __init__(self, tree, blacklisted_classes, blacklisted_events, blacklisted_functions, hand_written_codes): - self.known_types = ['char', 'int', 'int8_t', 'int16_t', 'int32_t', 'int64_t', 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t', 'bool_t', 'float', 'double', 'size_t', 'time_t', 'MSList', 'bctbx_list_t', 'MSVideoSize', 'LCSipTransports', 'PayloadType'] + self.known_types = ['char', 'int', 'int8_t', 'int16_t', 'int32_t', 'int64_t', 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t', 'bool_t', 'float', 'double', 'size_t', 'time_t', 'MSList', 'bctbx_list_t', 'MSVideoSize', 'LCSipTransports', 'PayloadType', 'LinphoneStatus'] self.internal_instance_method_names = ['destroy', 'ref', 'unref'] self.internal_property_names = ['user_data'] self.bctbxlist_types = set([])