Revision: 525
http://svn.sourceforge.net/pygccxml/?rev=525&view=rev
Author: mbaas
Date: 2006-09-06 06:56:17 -0700 (Wed, 06 Sep 2006)
Log Message:
-----------
Added a result_type attribute and RESULT_TYPE variable that contains the type of the result variable.
Modified Paths:
--------------
pyplusplus_dev/pyplusplus/function_transformers/code_manager.py
Modified: pyplusplus_dev/pyplusplus/function_transformers/code_manager.py
===================================================================
--- pyplusplus_dev/pyplusplus/function_transformers/code_manager.py 2006-09-06 13:55:04 UTC (rev 524)
+++ pyplusplus_dev/pyplusplus/function_transformers/code_manager.py 2006-09-06 13:56:17 UTC (rev 525)
@@ -40,6 +40,8 @@
@type input_params: list of str
@ivar result_var: The name of the variable that will receive the result of the function call. If None, the return value is ignored. This attribute will be used for the variable RESULT_VAR_ASSIGNMENT.
@type result_var: str
+ @ivar result_type: The type of the variable 'result_var'
+ @type result_type: str
@ivar result_expr: A string containing the expression that will be put after the "return" statement. This expression is used for the variable RETURN_STMT.
@type result_expr: str
@@ -71,6 +73,9 @@
# function call. If None, the return value is ignored.
self.result_var = None
+ # The type of 'result_var'
+ self.result_type = "void"
+
# A string containing the expression that will be put after
# the "return" statement.
self.result_expr = None
@@ -180,6 +185,10 @@
if self.result_var!=None:
self.RESULT_VAR_ASSIGNMENT = "%s = "%self.result_var
+ # RESULT_TYPE
+ if self.result_type!=None:
+ self.RESULT_TYPE = str(self.result_type)
+
# INPUT_PARAMS
self.INPUT_PARAMS = ", ".join(self.input_params)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|