Don't write a function stub if there is no pyName (such as for operator functions)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71048 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2012-03-29 16:59:34 +00:00
parent 547ad2938e
commit 289888aa8e

View File

@@ -249,6 +249,8 @@ class PiWrapperGenerator(generators.WrapperGeneratorBase):
#-----------------------------------------------------------------------
def generateFunction(self, function, stream):
assert isinstance(function, extractors.FunctionDef)
if not function.pyName:
return
stream.write('\ndef %s' % function.pyName)
if function.overloads:
stream.write('(*args, **kw)')