Revision: 1005
http://svn.sourceforge.net/pygccxml/?rev=1005&view=rev
Author: roman_yakovenko
Date: 2007-04-19 09:15:51 -0700 (Thu, 19 Apr 2007)
Log Message:
-----------
removing useless code
Modified Paths:
--------------
pygccxml_dev/pygccxml/parser/patcher.py
Modified: pygccxml_dev/pygccxml/parser/patcher.py
===================================================================
--- pygccxml_dev/pygccxml/parser/patcher.py 2007-04-19 11:23:51 UTC (rev 1004)
+++ pygccxml_dev/pygccxml/parser/patcher.py 2007-04-19 16:15:51 UTC (rev 1005)
@@ -25,7 +25,7 @@
def patch_it(self):
for decl in declarations.make_flatten( self.decls ):
if not isinstance( decl, declarations.calldef_t ):
- continue
+ continue
for arg in decl.arguments:
if not arg.default_value:
continue
@@ -67,7 +67,13 @@
def __is_invalid_integral(self, func, arg):
type_ = declarations.remove_reference( declarations.remove_cv( arg.type ) )
- return declarations.is_integral( type_ )
+ if not declarations.is_integral( type_ ):
+ return False
+ try:
+ int( arg.default_value )
+ return False
+ except:
+ return True
def __fix_invalid_integral(self, func, arg):
try:
@@ -113,14 +119,9 @@
enums = filter( lambda decl: isinstance( decl, declarations.enumeration_t )
, scope.declarations )
for enum_decl in enums:
- valnames = map(lambda x: x[0], enum_decl.values)
- valnums = map(lambda x: x[1], enum_decl.values)
- if default_value in valnames:
+ if enum_decl.has_value_name( default_value ):
return enum_decl
- if default_value in valnums:
- return enum_decl
- else:
- return None
+ return None
def __is_double_call( self, func, arg ):
call_invocation = declarations.call_invocation
@@ -197,4 +198,4 @@
patcher2 = fix_casting_operator_name_patcher_t( decls )
patcher2.patch_it()
return patcher.decls
-
\ No newline at end of file
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|