Permalink
Browse files

Rename ifilter argument to lfilter for consistency, and because the n…

…ame is better (location filter).
  • Loading branch information...
1 parent d29095b commit fd3050c3c413a4d064ff6a2a77dea6f4699bd046 @cournape committed Dec 1, 2008
Showing with 6 additions and 6 deletions.
  1. +4 −4 misc.py
  2. +2 −2 xml2cython.py
View
@@ -22,7 +22,7 @@ def query_items(xml):
return keep, named, locations
-def classify(items, locations, ifilter=None):
+def classify(items, locations, lfilter=None):
# Dictionaries name -> typedesc instances
funcs = {}
tpdefs = {}
@@ -32,13 +32,13 @@ def classify(items, locations, ifilter=None):
vars = {}
unions = {}
- if ifilter is None:
- ifilter = lambda x : True
+ if lfilter is None:
+ lfilter = lambda x : True
for it in items:
try:
origin = locations[it][0]
- if ifilter(origin):
+ if lfilter(origin):
if isinstance(it, typedesc.Function):
funcs[it.name] = it
elif isinstance(it, typedesc.EnumValue):
View
@@ -23,7 +23,7 @@ def generate_main(header, xml, output, lfilter=None):
output.write("cdef extern from '%s':\n" % header)
funcs, tpdefs, enumvals, enums, structs, vars, unions = \
- classify(items, locations, ifilter=lfilter)
+ classify(items, locations, lfilter=lfilter)
puller = TypePuller(items)
for f in funcs.values():
@@ -118,7 +118,7 @@ def main(argv=None):
#
# items, named, locations = query_items(xml_name)
# funcs, tpdefs, enumvals, enums, structs, vars, unions = \
-# classify(items, locations, ifilter=header_matcher.search)
+# classify(items, locations, lfilter=header_matcher.search)
#
# #arguments = signatures_types(funcs.values())
# #print "Need to pull out arguments", [named[i] for i in arguments]

0 comments on commit fd3050c

Please sign in to comment.