[pygccxml-commit] source/pyplusplus/code_creators calldef.py,1.45,1.46
Brought to you by:
mbaas,
roman_yakovenko
From: Roman <rom...@us...> - 2006-03-02 13:30:45
|
Update of /cvsroot/pygccxml/source/pyplusplus/code_creators In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4665/pyplusplus/code_creators Modified Files: calldef.py Log Message: init< ... , optional< ... > > is now implemented Index: calldef.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/code_creators/calldef.py,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** calldef.py 28 Feb 2006 08:06:02 -0000 1.45 --- calldef.py 2 Mar 2006 13:30:37 -0000 1.46 *************** *** 527,531 **** def _generate_definition_args(self): ! return ', '.join( map( self._create_arg_code, self.declaration.arguments ) ) def create_init_code(self): --- 527,545 ---- def _generate_definition_args(self): ! answer = [] ! optionals = [] ! for arg in self.declaration.arguments: ! if arg.default_value or optionals: ! optionals.append( self._create_arg_code( arg ) ) ! else: ! answer.append( self._create_arg_code( arg ) ) ! ! optionals_str = '' ! if optionals: ! optionals_str = algorithm.create_identifier( self, '::boost::python::optional' ) ! optionals_str = optionals_str + '< ' + ', '.join( optionals ) + ' >' ! answer.append( optionals_str ) ! return ', '.join( answer ) ! def create_init_code(self): |