-Minor addition to ordLookup to make optional the creation of default names.
git-svn-id: http://pefile.googlecode.com/svn/trunk@138 8842bc4e-7134-0410-8230-5dc5194fb5c1
diff --git a/ordlookup/__init__.py b/ordlookup/__init__.py
index a743398..c74cb66 100644
--- a/ordlookup/__init__.py
+++ b/ordlookup/__init__.py
@@ -13,14 +13,16 @@
'oleaut32.dll':oleaut32.ord_names,
}
-def ordLookup(libname, ord):
+def ordLookup(libname, ord, make_name=False):
'''
Lookup a name for the given ordinal if it's in our
database.
'''
names = ords.get(libname.lower())
if names == None:
- return 'ord%d' % ord
+ if make_name is True:
+ return 'ord%d' % ord
+ return None
name = names.get(ord)
if name == None:
return 'ord%d' % ord