Hide SWIG wrapping artifacts from Jazzy docs
@@ -195,6 +195,14 @@ def fixProxyCode(fileName):
# Rename #import "XXX_proxy.h" -> #import "NTXXX.h" / same for #include
line = re.sub('#(import|include)\s+"(.*)_proxy.h"', '#\\1 "NT\\2.h"', line)
+ # Add '@internal:nodoc:' comment above the special SWIG-wrapper lines
+ hide = line.strip() in ['void *swigCPtr;', 'BOOL swigCMemOwn;', '-(void*)getCptr;', '-(id)initWithCptr: (void*)cptr swigOwnCObject: (BOOL)ownCObject;', '-(long long)swigGetRawPtr;', '-(NSString*)swigGetClassName;', '-(void *)swigGetDirectorObject;']
+ if line.find('swigCreatePolymorphicInstance:') != -1:
+ hide = True
+ if hide:
+ numSpaces = len(line) - len(line.lstrip())
+ lines_out.append(line[:numSpaces] + '/** @internal:nodoc: */\n')
+
lines_out.append(line)
with open(fileName, 'w') as f:
