mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-09 05:20:08 +01:00
Allow cppSignature and pyArgsString for CppMethods too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72929 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -942,7 +942,7 @@ class ClassDef(BaseDef):
|
||||
"""
|
||||
md = CppMethodDef_sip('', self.name, argsString, body, doc=doc,
|
||||
isCtor=True, klass=self, noDerivedCtor=noDerivedCtor,
|
||||
cppSignature=None, **kw)
|
||||
cppSignature=cppSignature, **kw)
|
||||
self._addMethod(md)
|
||||
return md
|
||||
|
||||
|
||||
@@ -423,7 +423,11 @@ class PiWrapperGenerator(generators.WrapperGeneratorBase):
|
||||
|
||||
def generateMethod(self, method, stream, indent, name=None, docstring=None):
|
||||
assert isinstance(method, extractors.MethodDef)
|
||||
if method.ignored:
|
||||
for m in method.all(): # use the first not ignored if there are overloads
|
||||
if not m.ignored:
|
||||
method = m
|
||||
break
|
||||
else:
|
||||
return
|
||||
if method.isDtor:
|
||||
return
|
||||
|
||||
@@ -832,13 +832,14 @@ from .%s import *
|
||||
assert isinstance(method, extractors.CppMethodDef_sip)
|
||||
if method.ignored:
|
||||
return
|
||||
cppSig = " [ %s ]" % method.cppSignature if method.cppSignature else ""
|
||||
if method.isCtor:
|
||||
stream.write('%s%s%s%s;\n' %
|
||||
(indent, method.name, method.argsString, self.annotate(method)))
|
||||
stream.write('%s%s%s%s%s;\n' %
|
||||
(indent, method.name, method.argsString, self.annotate(method), cppSig))
|
||||
else:
|
||||
stream.write('%s%s %s%s%s;\n' %
|
||||
stream.write('%s%s %s%s%s%s;\n' %
|
||||
(indent, method.type, method.name, method.argsString,
|
||||
self.annotate(method)))
|
||||
self.annotate(method), cppSig))
|
||||
stream.write('%s%%MethodCode\n' % indent)
|
||||
stream.write(nci(method.body, len(indent)+4))
|
||||
stream.write('%s%%End\n\n' % indent)
|
||||
|
||||
Reference in New Issue
Block a user