summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-08-14 20:14:29 (GMT)
committerGuido van Rossum <guido@python.org>1997-08-14 20:14:29 (GMT)
commit9189bdabd5711b63158e6697c5aab245ee25bef9 (patch)
tree049bb79ee2ec6b1c40e88dd03d3f0bdd43249809 /Tools
parent5526e394a2bc5b01896a607b4d2871c8c84a6a83 (diff)
downloadcpython-9189bdabd5711b63158e6697c5aab245ee25bef9.zip
cpython-9189bdabd5711b63158e6697c5aab245ee25bef9.tar.gz
cpython-9189bdabd5711b63158e6697c5aab245ee25bef9.tar.bz2
support C++ comments
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/scripts/h2py.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Tools/scripts/h2py.py b/Tools/scripts/h2py.py
index c34073d..513fa4b 100755
--- a/Tools/scripts/h2py.py
+++ b/Tools/scripts/h2py.py
@@ -32,8 +32,9 @@ p_macro = regex.compile(
p_include = regex.compile('^[\t ]*#[\t ]*include[\t ]+<\([a-zA-Z0-9_/\.]+\)')
p_comment = regex.compile('/\*\([^*]+\|\*+[^/]\)*\(\*+/\)?')
+p_cpp_comment = regex.compile('//.*')
-ignores = [p_comment]
+ignores = [p_comment, p_cpp_comment]
p_char = regex.compile("'\(\\\\.[^\\\\]*\|[^\\\\]\)'")
@@ -48,6 +49,7 @@ except KeyError:
searchdirs=['/usr/include']
def main():
+ global filedict
opts, args = getopt.getopt(sys.argv[1:], 'i:')
for o, a in opts:
if o == '-i':