Revision: 619
http://svn.sourceforge.net/pygccxml/?rev=619&view=rev
Author: mbaas
Date: 2006-10-04 05:17:55 -0700 (Wed, 04 Oct 2006)
Log Message:
-----------
Minor bugfix: access_type filtering was constraining the type to METHOD but there are also other member types.
Modified Paths:
--------------
pyplusplus_dev/contrib/pypp_api/pypp_api/decltypes.py
pyplusplus_dev/contrib/pypp_api/pypp_api/declwrapper.py
pyplusplus_dev/contrib/pypp_api/pypp_api/filters.py
Modified: pyplusplus_dev/contrib/pypp_api/pypp_api/decltypes.py
===================================================================
--- pyplusplus_dev/contrib/pypp_api/pypp_api/decltypes.py 2006-10-04 09:53:10 UTC (rev 618)
+++ pyplusplus_dev/contrib/pypp_api/pypp_api/decltypes.py 2006-10-04 12:17:55 UTC (rev 619)
@@ -19,6 +19,7 @@
VARIABLE = 0x40
CALLABLE = METHOD | FUNCTION | CONSTRUCTOR
+CLASS_MEMBER = METHOD | CONSTRUCTOR | VARIABLE | ENUM
# cpp
class cpp:
@@ -70,4 +71,4 @@
elif type(val)==str:
return '"%s"'%val
else:
- return str(val)
\ No newline at end of file
+ return str(val)
Modified: pyplusplus_dev/contrib/pypp_api/pypp_api/declwrapper.py
===================================================================
--- pyplusplus_dev/contrib/pypp_api/pypp_api/declwrapper.py 2006-10-04 09:53:10 UTC (rev 618)
+++ pyplusplus_dev/contrib/pypp_api/pypp_api/declwrapper.py 2006-10-04 12:17:55 UTC (rev 619)
@@ -468,7 +468,7 @@
@type header: str
@param headerdir: Select declarations by the directory in which their header file is located
@type headerdir: str
- @param accesstype: Access type (PUBLIC or PROTECTED). This implies the type flag MEMBER_FUNCTION.
+ @param accesstype: Access type (PUBLIC or PROTECTED). This implies the type flags CLASS_MEMBER.
@param const: Select declarations by their constness.
@type const: bool
@param filter: User defined filter function
@@ -525,7 +525,7 @@
# accesstype filter
if accesstype!=None:
addFilter(accesstype, AccessTypeFilter)
- itype |= METHOD
+ itype |= CLASS_MEMBER
# const filter
if const!=None:
addFilter(const, ConstFilter)
Modified: pyplusplus_dev/contrib/pypp_api/pypp_api/filters.py
===================================================================
--- pyplusplus_dev/contrib/pypp_api/pypp_api/filters.py 2006-10-04 09:53:10 UTC (rev 618)
+++ pyplusplus_dev/contrib/pypp_api/pypp_api/filters.py 2006-10-04 12:17:55 UTC (rev 619)
@@ -429,7 +429,13 @@
return "accesstype==%s"%self.accesstype
def __call__(self, decl):
- at = getattr(decl, "access_type", None)
+ try:
+ at = getattr(decl, "access_type", None)
+ except RuntimeError, e:
+ # Accessing access_type on non-member variables
+ # raises an error
+ at = None
+
if at==None:
return False
return at==self.accesstype
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|