Revision: 590
http://svn.sourceforge.net/pygccxml/?rev=590&view=rev
Author: mbaas
Date: 2006-09-26 02:06:43 -0700 (Tue, 26 Sep 2006)
Log Message:
-----------
Take static members into account when setting up the substitution variables.
Modified Paths:
--------------
pyplusplus_dev/pyplusplus/function_transformers/substitution_manager.py
Modified: pyplusplus_dev/pyplusplus/function_transformers/substitution_manager.py
===================================================================
--- pyplusplus_dev/pyplusplus/function_transformers/substitution_manager.py 2006-09-26 08:54:57 UTC (rev 589)
+++ pyplusplus_dev/pyplusplus/function_transformers/substitution_manager.py 2006-09-26 09:06:43 UTC (rev 590)
@@ -230,11 +230,14 @@
# Check if we're dealing with a member function...
clsdecl = self._class_decl(decl)
if clsdecl!=None:
- selfname = self.wrapper_func._make_name_unique("self")
- selfarg = declarations.argument_t(selfname, declarations.dummy_type_t("%s&"%clsdecl.name))
- self.wrapper_func.arg_list.insert(0, selfarg)
- self.wrapper_func.CALL_FUNC_NAME = "%s.%s"%(selfname, self.wrapper_func.CALL_FUNC_NAME)
- self._insert_arg_idx_offset = 1
+ if decl.has_static:
+ self.wrapper_func.CALL_FUNC_NAME = "%s::%s"%(clsdecl.name, self.wrapper_func.CALL_FUNC_NAME)
+ else:
+ selfname = self.wrapper_func._make_name_unique("self")
+ selfarg = declarations.argument_t(selfname, declarations.dummy_type_t("%s&"%clsdecl.name))
+ self.wrapper_func.arg_list.insert(0, selfarg)
+ self.wrapper_func.CALL_FUNC_NAME = "%s.%s"%(selfname, self.wrapper_func.CALL_FUNC_NAME)
+ self._insert_arg_idx_offset = 1
# Argument index map
# Original argument index ---> Input arg index (indices are 0-based!)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|