* 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:
Robin Dunn
2011-12-02 01:10:49 +00:00
parent 5d9f463534
commit a236ea1867
2 changed files with 15 additions and 15 deletions

View File

@@ -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: