Revision: 1357
http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1357&view=rev
Author: roman_yakovenko
Date: 2008-06-26 02:36:26 -0700 (Thu, 26 Jun 2008)
Log Message:
-----------
cleaning no_init conditions
Modified Paths:
--------------
pyplusplus_dev/pyplusplus/code_creators/class_declaration.py
Modified: pyplusplus_dev/pyplusplus/code_creators/class_declaration.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/class_declaration.py 2008-06-26 07:41:16 UTC (rev 1356)
+++ pyplusplus_dev/pyplusplus/code_creators/class_declaration.py 2008-06-26 09:36:26 UTC (rev 1357)
@@ -218,15 +218,14 @@
result.append( ', %s' % self.documentation )
used_init = None
inits = filter( lambda x: isinstance( x, calldef.constructor_t ), self.creators )
- if ( self.declaration.is_abstract \
- or not declarations.has_any_non_copyconstructor(self.declaration) ) \
- and not self.wrapper \
- or ( declarations.has_destructor( self.declaration )
- and not declarations.has_public_destructor( self.declaration ) ):
- #TODO: or self.declaration has public constructor and destructor
+ has_nonpublic_destructor = declarations.has_destructor( self.declaration ) \
+ and not declarations.has_public_destructor( self.declaration )
+ if has_nonpublic_destructor \
+ or ( self.declaration.is_abstract and not self.wrapper ) \
+ or not declarations.has_any_non_copyconstructor(self.declaration):
result.append( ", " )
result.append( algorithm.create_identifier( self, '::boost::python::no_init' ) )
- elif not declarations.has_trivial_constructor( self.declaration ):
+ elif not self.declaration.find_trivial_constructor():
if inits:
used_init = inits[0]
result.append( ", " )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|