Revision: 978
http://svn.sourceforge.net/pygccxml/?rev=978&view=rev
Author: roman_yakovenko
Date: 2007-04-10 13:12:42 -0700 (Tue, 10 Apr 2007)
Log Message:
-----------
slightly improving code for is_noncopyable function
Modified Paths:
--------------
pygccxml_dev/pygccxml/declarations/type_traits.py
Modified: pygccxml_dev/pygccxml/declarations/type_traits.py
===================================================================
--- pygccxml_dev/pygccxml/declarations/type_traits.py 2007-04-10 06:15:58 UTC (rev 977)
+++ pygccxml_dev/pygccxml/declarations/type_traits.py 2007-04-10 20:12:42 UTC (rev 978)
@@ -848,15 +848,18 @@
if __is_noncopyable_single( base_desc.related_class ):
return True
- if not has_trivial_copy( class_ ) \
- or not has_public_constructor( class_ )\
- or class_.is_abstract \
- or ( has_destructor( class_ ) and not has_public_destructor( class_ ) ):
+ if class_.is_abstract:
return True
+ elif not has_trivial_copy( class_ ):
+ return True
+ elif not has_public_constructor( class_ ):
+ return True
+ elif has_destructor( class_ ) and not has_public_destructor( class_ ):
+ return True
+ else:
+ return __is_noncopyable_single( class_ )
- return __is_noncopyable_single( class_ )
-
def is_defined_in_xxx( xxx, cls ):
"""small helper function, that checks whether class ( C{cls} ) is defined
under C{::xxx} namespace"""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|