Skip to content

Commit 7275d3e

Browse files
Don't replace "inline namespace" in split.py
1 parent 6803ed7 commit 7275d3e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

split.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
"""This script splits httplib.h into .h and .cc parts."""
44

55
import os
6+
import re
67
import sys
78

89
BORDER = (
910
"// ----------------------------------------------------------------------------"
1011
)
12+
INLINE_RE = re.compile(r"inline(?! namespace) ")
1113

1214

1315
def walk_dir(file_name, directory):
@@ -72,7 +74,7 @@ def split(lib_name, search_dirs, extension="cc", out="out"):
7274
if is_border_line:
7375
in_implementation = not in_implementation
7476
elif in_implementation:
75-
fc.write(line.replace("inline ", ""))
77+
fc.write(INLINE_RE.sub("", line))
7678
else:
7779
fh.write(line)
7880
fc.write("} // namespace httplib\n")

0 commit comments

Comments
 (0)