[Python-checkins] cpython (2.7): Issue #23330: h2py now supports arbitrary filenames in #include.

serhiy.storchaka python-checkins at python.org
Sun May 3 15:18:46 CEST 2015


https://hg.python.org/cpython/rev/b32ca610c9e6
changeset:   95864:b32ca610c9e6
branch:      2.7
parent:      95850:5d356223f075
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Sun May 03 15:35:02 2015 +0300
summary:
  Issue #23330: h2py now supports arbitrary filenames in #include.

files:
  Misc/NEWS             |  2 ++
  Tools/scripts/h2py.py |  2 +-
  2 files changed, 3 insertions(+), 1 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -210,6 +210,8 @@
 Tools/Demos
 -----------
 
+- Issue #23330: h2py now supports arbitrary filenames in #include.
+
 - Issue #6639: Module-level turtle functions no longer raise TclError after
   closing the window.
 
diff --git a/Tools/scripts/h2py.py b/Tools/scripts/h2py.py
--- a/Tools/scripts/h2py.py
+++ b/Tools/scripts/h2py.py
@@ -29,7 +29,7 @@
   '^[\t ]*#[\t ]*define[\t ]+'
   '([a-zA-Z0-9_]+)\(([_a-zA-Z][_a-zA-Z0-9]*)\)[\t ]+')
 
-p_include = re.compile('^[\t ]*#[\t ]*include[\t ]+<([a-zA-Z0-9_/\.]+)')
+p_include = re.compile('^[\t ]*#[\t ]*include[\t ]+<([^>\n]+)>')
 
 p_comment = re.compile(r'/\*([^*]+|\*+[^/])*(\*+/)?')
 p_cpp_comment = re.compile('//.*')

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list