From 29b453eb86513a2af4eb4bff4b988addc8b49729 Mon Sep 17 00:00:00 2001 From: Giles Payne Date: Wed, 18 Nov 2020 22:06:59 +0900 Subject: [PATCH] Objective-C name clash avoidance --- modules/objc/generator/gen_objc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/objc/generator/gen_objc.py b/modules/objc/generator/gen_objc.py index bd9743c757..61d5e140ab 100755 --- a/modules/objc/generator/gen_objc.py +++ b/modules/objc/generator/gen_objc.py @@ -570,7 +570,7 @@ def get_swift_type(ctype): return swift_type def build_swift_extension_decl(name, args, constructor, static, ret_type): - extension_decl = ("class " if static else "") + (("func " + name) if not constructor else "convenience init") + "(" + extension_decl = "@nonobjc " + ("class " if static else "") + (("func " + name) if not constructor else "convenience init") + "(" swift_args = [] for a in args: if a.ctype not in type_dict: