Update of /cvsroot/pywin32/pywin32/AutoDuck
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4186
Modified Files:
makedfromi.py
Log Message:
Handle leading whitespace in the .i comments better.
Index: makedfromi.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/AutoDuck/makedfromi.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** makedfromi.py 7 Sep 2004 03:02:56 -0000 1.5
--- makedfromi.py 8 Nov 2004 02:58:35 -0000 1.6
***************
*** 51,73 ****
modDoc, lineNo = GetComments(line, lineNo, lines)
lineNo += 1
- elif line[:10]=="// @pyswig":
- doc, lineNo = GetComments(line, lineNo, lines)
- curMethod = doc[8:], []
- methods.append(curMethod)
- elif line[:11]=="// @pymeth ":
- doc, lineNo = GetComments(line, lineNo, lines)
- nativeMethods.append(line+doc)
elif line[:7]=="#define" and not bInRawBlock:
cname = string.split(line)[1]
doc, lineNo = GetComments(line, lineNo, lines)
constants.append((cname, doc))
! else:
! pos = string.find(line, '// @')
! if pos>=0:
doc, lineNo = GetComments(line, lineNo, lines)
! if curMethod:
! curMethod[1].append("// " + doc + '\n')
! else:
! extra_tags.append("// " + doc + '\n')
except:
print "Line %d is badly formed - %s" % (lineNo, str(sys.exc_value))
--- 51,74 ----
modDoc, lineNo = GetComments(line, lineNo, lines)
lineNo += 1
elif line[:7]=="#define" and not bInRawBlock:
cname = string.split(line)[1]
doc, lineNo = GetComments(line, lineNo, lines)
constants.append((cname, doc))
! elif line[:2]=="//":
! rest = line[2:].strip()
! if rest.startswith("@pyswig"):
doc, lineNo = GetComments(line, lineNo, lines)
! curMethod = doc[8:], []
! methods.append(curMethod)
! elif rest.startswith("@pymeth "):
! doc, lineNo = GetComments(line, lineNo, lines)
! nativeMethods.append(line+doc)
! else:
! if rest.startswith("@"):
! doc, lineNo = GetComments(line, lineNo, lines)
! if curMethod:
! curMethod[1].append("// " + doc + '\n')
! else:
! extra_tags.append("// " + doc + '\n')
except:
print "Line %d is badly formed - %s" % (lineNo, str(sys.exc_value))
|