Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patch from Bill Allombert for member functions #95

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion autogen/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
cdef extern from *:
'''


member_re = re.compile(r"^_\.[A-Za-z][A-Za-z0-9_]*$")
function_re = re.compile(r"^[A-Za-z][A-Za-z0-9_]*$")
function_blacklist = {"O", # O(p^e) needs special parser support
"alias", # Not needed and difficult documentation
Expand Down Expand Up @@ -105,6 +105,8 @@ def can_handle_function(self, function, cname="", **kwds):
if function in function_blacklist:
# Blacklist specific troublesome functions
return False
if member_re.match(function):
function = cname
if not function_re.match(function):
# Not a legal function name, like "!_"
return False
Expand Down