[pygccxml-commit] SF.net SVN: pygccxml: [826] pyplusplus_dev
Brought to you by:
mbaas,
roman_yakovenko
|
From: <rom...@us...> - 2007-01-01 05:43:58
|
Revision: 826
http://svn.sourceforge.net/pygccxml/?rev=826&view=rev
Author: roman_yakovenko
Date: 2006-12-31 21:43:59 -0800 (Sun, 31 Dec 2006)
Log Message:
-----------
fixing bug
Modified Paths:
--------------
pyplusplus_dev/pyplusplus/code_creators/calldef_utils.py
pyplusplus_dev/unittests/data/function_transformations_to_be_exported.hpp
pyplusplus_dev/unittests/function_transformations_tester.py
Modified: pyplusplus_dev/pyplusplus/code_creators/calldef_utils.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/calldef_utils.py 2006-12-31 11:27:03 UTC (rev 825)
+++ pyplusplus_dev/pyplusplus/code_creators/calldef_utils.py 2007-01-01 05:43:59 UTC (rev 826)
@@ -109,9 +109,9 @@
@property
def pre_return_code( self ):
if None is self.__pre_return_code:
- if not self.__controller.return_variables \
- or self.__function.call_policies.is_default() \
- or declarations.is_void( self.__function.return_type ):
+ if declarations.is_void( self.__function.return_type ) \
+ and ( self.__function.call_policies.is_default() \
+ or False == bool( self.__controller.return_variables ) ):
self.__pre_return_code = ''
else:
c_p_typedef = 'typedef %s %s;' \
Modified: pyplusplus_dev/unittests/data/function_transformations_to_be_exported.hpp
===================================================================
--- pyplusplus_dev/unittests/data/function_transformations_to_be_exported.hpp 2006-12-31 11:27:03 UTC (rev 825)
+++ pyplusplus_dev/unittests/data/function_transformations_to_be_exported.hpp 2007-01-01 05:43:59 UTC (rev 826)
@@ -212,6 +212,11 @@
int do_nothing( int& v ){
return v;
}
+
+ modify_type_tester_t* clone(int& c){
+ return new modify_type_tester_t();
+ }
+
};
}
Modified: pyplusplus_dev/unittests/function_transformations_tester.py
===================================================================
--- pyplusplus_dev/unittests/function_transformations_tester.py 2006-12-31 11:27:03 UTC (rev 825)
+++ pyplusplus_dev/unittests/function_transformations_tester.py 2007-01-01 05:43:59 UTC (rev 826)
@@ -75,6 +75,10 @@
do_nothing = cls.mem_fun( 'do_nothing' )
do_nothing.add_transformation( ft.modify_type(0, declarations.remove_reference ) )
+ clone = cls.mem_fun( 'clone' )
+ clone.call_policies = call_policies.return_value_policy( call_policies.manage_new_object )
+ clone.add_transformation( ft.modify_type(0, declarations.remove_reference ) )
+
def run_tests(self, module):
"""Run the actual unit tests.
"""
@@ -221,6 +225,7 @@
tmp = module.modify_type_tester_t()
self.failUnless( 123 == tmp.do_nothing(123) )
+ self.failUnless( tmp != tmp.clone(123) )
def create_suite():
suite = unittest.TestSuite()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|