contribute ctypeslib patch?

Jan Wagner <[email protected]> Thu, 13 Aug 2015 14:19:30 +0900
Newsgroups gmane.comp.python.ctypes
Message-ID <[email protected]>
Hi list,

it seems this project is quite dead and I'm not sure how to
contribute a feature fix (not even to
https://pypi.python.org/pypi/ctypeslib/). Perhaps someone on the
list is able to do it?

There is an issue in ctypeslib codegenerator.py that affects
xml2py.py option "-r" for which usage says that "-r EXPRESSION 
regular expression for symbols to include". The expression is
actually never evaluated as a regular expression. Only exact name
matches are selected. The below patch changes the behaviour to be
consistent with the usage instructions (and makes -r behaviour more
useful).

cheers,
Jan

---
/usr/lib/pymodules/python2.5/ctypeslib/codegen/codegenerator.py    
2009-01-17 03:50:18.000000000 +0900
+++ codegenerator.py    2015-04-08 18:34:06.000000000 +0900
@@ -859,6 +859,12 @@
                 if match and match.group() == i.name:
                     todo.append(i)
                     break
+               # above selects only *exact* matches, now include
partial/regexp name matches:
+               match = s.search(i.name)
+               if match:
+                    todo.append(i)
+                    break
+
     if symbols or expressions:
         items = todo

------------------------------------------------------------------------------

_______________________________________________
ctypes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ctypes-users