mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 19:40:12 +01:00
* Use all_raise_py_exception=True in the %Module directive.
* remove pyRaisesException (May want to add it back later with different meaning...) * Fix use of const for CppMethods * Make flattenNode optionally not rstrip the string segments git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69906 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -65,6 +65,7 @@ class SipWrapperGenerator(generators.WrapperGeneratorBase):
|
||||
%%Module( name=%s.%s,
|
||||
keyword_arguments="All",
|
||||
use_argument_names=True,
|
||||
all_raise_py_exception=True,
|
||||
language="C++")
|
||||
{
|
||||
%%AutoPyName(remove_leading="wx")
|
||||
@@ -598,7 +599,10 @@ from %s import *
|
||||
else:
|
||||
if fargs:
|
||||
fargs = ', ' + fargs
|
||||
fargs = '(%s* self%s)' % (klass.name, fargs)
|
||||
selfConst = ''
|
||||
if method.isConst:
|
||||
selfConst = 'const '
|
||||
fargs = '(%s%s* self%s)' % (selfConst, klass.name, fargs)
|
||||
fstream.write('%s%%TypeCode\n' % indent)
|
||||
else:
|
||||
fname = '_%s_function' % method.name
|
||||
@@ -767,15 +771,6 @@ from %s import *
|
||||
annotations.append('ReleaseGIL')
|
||||
if item.noCopy:
|
||||
annotations.append('NoCopy')
|
||||
if item.pyRaisesException:
|
||||
# is it a class method?
|
||||
if isinstance(item, extractors.MethodDef):
|
||||
if not item.isCtor and not item.isDtor:
|
||||
annotations.append('RaisesPyException')
|
||||
# otherwise it's a plain function so no additional conditions
|
||||
# need to be checked
|
||||
else:
|
||||
annotations.append('RaisesPyException')
|
||||
|
||||
if isinstance(item, extractors.MethodDef):
|
||||
if item.defaultCtor:
|
||||
|
||||
Reference in New Issue
Block a user