[pygccxml-commit] SF.net SVN: pygccxml: [855] pyplusplus_dev
Brought to you by:
mbaas,
roman_yakovenko
From: <rom...@us...> - 2007-01-07 07:28:44
|
Revision: 855 http://svn.sourceforge.net/pygccxml/?rev=855&view=rev Author: roman_yakovenko Date: 2007-01-06 23:28:43 -0800 (Sat, 06 Jan 2007) Log Message: ----------- adding warning and xml cache Modified Paths: -------------- pygccxml_dev/pygccxml/parser/scanner.py pyplusplus_dev/pyplusplus/decl_wrappers/calldef_wrapper.py pyplusplus_dev/pyplusplus/messages/warnings_.py pyplusplus_dev/unittests/fundamental_tester_base.py Modified: pygccxml_dev/pygccxml/parser/scanner.py =================================================================== --- pygccxml_dev/pygccxml/parser/scanner.py 2007-01-07 06:14:07 UTC (rev 854) +++ pygccxml_dev/pygccxml/parser/scanner.py 2007-01-07 07:28:43 UTC (rev 855) @@ -322,7 +322,7 @@ if isinstance( calldef, declaration_t ): calldef.name = attrs.get(XML_AN_NAME, '') calldef.has_extern = attrs.get( XML_AN_EXTERN, False ) - throw_stmt = attrs.get( XML_AN_THROW, "" ) + throw_stmt = attrs.get( XML_AN_THROW, None ) if None is throw_stmt: calldef.does_throw = True calldef.exceptions = [] Modified: pyplusplus_dev/pyplusplus/decl_wrappers/calldef_wrapper.py =================================================================== --- pyplusplus_dev/pyplusplus/decl_wrappers/calldef_wrapper.py 2007-01-07 06:14:07 UTC (rev 854) +++ pyplusplus_dev/pyplusplus/decl_wrappers/calldef_wrapper.py 2007-01-07 07:28:43 UTC (rev 855) @@ -208,6 +208,13 @@ return messages.W1011 return '' + def _readme_impl( self ): + msgs = super( member_function_t, self )._readme_impl() + if self.does_throw == False \ + and self.virtuality != declarations.VIRTUALITY_TYPES.NOT_VIRTUAL: + msgs.append( messages.W1046 ) + return msgs + class constructor_t( declarations.constructor_t, calldef_t ): """defines a set of properties, that will instruct Py++ how to expose the constructor""" def __init__(self, *arguments, **keywords): Modified: pyplusplus_dev/pyplusplus/messages/warnings_.py =================================================================== --- pyplusplus_dev/pyplusplus/messages/warnings_.py 2007-01-07 06:14:07 UTC (rev 854) +++ pyplusplus_dev/pyplusplus/messages/warnings_.py 2007-01-07 07:28:43 UTC (rev 855) @@ -132,6 +132,11 @@ 'You can fix this by setting array size to the actual one.' \ 'For more information see "array_t" class documentation.' +W1046 = 'The virtual function was declared with empty throw. ' \ + 'Adding the ability to override the function from Python breaks the exception specification. ' \ + 'The function wrapper can throw any exception. ' \ + 'In case of exception in run-time, the behaviour of the program is undefined! ' + warnings = globals() for identifier, explanation in warnings.items(): Modified: pyplusplus_dev/unittests/fundamental_tester_base.py =================================================================== --- pyplusplus_dev/unittests/fundamental_tester_base.py 2007-01-07 06:14:07 UTC (rev 854) +++ pyplusplus_dev/unittests/fundamental_tester_base.py 2007-01-07 07:28:43 UTC (rev 855) @@ -7,6 +7,7 @@ import sys import unittest import autoconfig +from pygccxml import parser from pyplusplus import module_builder LICENSE = """// Copyright 2004 Roman Yakovenko. @@ -63,7 +64,12 @@ def _create_extension_source_file(self): global LICENSE - mb = module_builder.module_builder_t( [self.__to_be_exported_header] + + xml_file = os.path.split( self.__to_be_exported_header )[1] + xml_file = os.path.join( autoconfig.build_dir, xml_file + '.xml' ) + xml_cached_fc = parser.create_cached_source_fc( self.__to_be_exported_header, xml_file ) + + mb = module_builder.module_builder_t( [xml_cached_fc] , gccxml_path=autoconfig.gccxml.executable , include_paths=[autoconfig.boost.include] , undefine_symbols=['__MINGW32__'] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |