Fix issue in Objective-C generator when a class name is a substring of its base class name

pull/23598/head
Giles Payne 2 years ago
parent 4ed07411c3
commit a44a6f6c87
  1. 2
      modules/objc/generator/gen_objc.py

@ -290,7 +290,7 @@ class ClassInfo(GeneralInfo):
self.member_classes = [] # Only relevant for modules self.member_classes = [] # Only relevant for modules
self.member_enums = [] # Only relevant for modules self.member_enums = [] # Only relevant for modules
if decl[1]: if decl[1]:
self.base = re.sub(r"^.*:", "", decl[1].split(",")[0]).strip().replace(self.objc_name, "") self.base = re.sub(r"^.*:", "", decl[1].split(",")[0]).strip()
if self.base: if self.base:
self.is_base_class = False self.is_base_class = False
self.native_ptr_name = "nativePtr" + self.objc_name self.native_ptr_name = "nativePtr" + self.objc_name

Loading…
Cancel
Save