Revision: 755
http://svn.sourceforge.net/pygccxml/?rev=755&view=rev
Author: roman_yakovenko
Date: 2006-11-26 12:15:57 -0800 (Sun, 26 Nov 2006)
Log Message:
-----------
changing templates
Modified Paths:
--------------
pyplusplus_dev_ft/pyplusplus/function_transformers/templates.py
Modified: pyplusplus_dev_ft/pyplusplus/function_transformers/templates.py
===================================================================
--- pyplusplus_dev_ft/pyplusplus/function_transformers/templates.py 2006-11-26 19:22:48 UTC (rev 754)
+++ pyplusplus_dev_ft/pyplusplus/function_transformers/templates.py 2006-11-26 20:15:57 UTC (rev 755)
@@ -31,42 +31,18 @@
]))
class mem_fun_v:
-
- original_function_call = Template( "$return_$wrapped_class::%function_name( $args );" )
-
override_body = Template( os.linesep.join([
- '$declare_variables'
- , 'boost::python::override $override_function_var_name = this->get_override( "$function_alias" );'
- , 'if( $override_function_var_name ){'
- , ' $declare_override_variables'
- , ' $override_pre_call'
- , ' ${save_override_return_value}boost::python::call<$override_return_type>( $override_function_var_name$override_input_params;'
- , ' $override_post_call'
- , ' $override_return_stmt'
+ 'if( boost::python::override $py_function_var = this->get_override( "$function_alias" ) ){'
+ , ' $declare_py_variables'
+ , ' $py_pre_call'
+ , ' ${save_py_result}boost::python::call<$py_return_type>( $py_function_var$py_arg_expressions );'
+ , ' $py_post_call'
+ , ' $py_return'
, '}'
, 'else{'
- , ' ' + original_function_call.template
+ , ' $cpp_return$wrapped_class::%function_name( $cpp_arg_expressions );'
, '}'
]))
-
- override_body_safe = Template( os.linesep.join([
- '$declare_gil_guard'
- , '$declare_variables'
- , '$lock_gil_guard'
- , '$declare_override_function = this->get_override( "$function_alias" );'
- , '$unlock_gil_guard'
- , 'if( $override_function_var_name ){'
- , ' $lock_gil_guard //release() will be called from destructor'
- , ' $declare_override_variables'
- , ' $override_pre_call'
- , ' ${save_override_return_value}boost::python::call<$override_return_type>( $override_function_var_name$override_input_params;'
- , ' $override_post_call'
- , ' $override_return_stmt'
- , '}'
- , 'else{'
- , ' ' + original_function_call.template
- , '}'
- ]))
default_body = Template( os.linesep.join([
'$declare_variables'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|