Issue 1454

This commit is contained in:
Thomas Nagy 2014-05-21 17:21:29 +02:00
parent 6566072086
commit 27f0fc9450
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64
3 changed files with 5 additions and 3 deletions

View File

@ -6,3 +6,4 @@
#include STRINGIFY(PASTE(PREFIX_VAL, PASTE(a, SUFFIX_VAL)).h)
int main() {return 0;}

View File

@ -65,9 +65,9 @@ def build(bld):
color = "GREEN"
else:
color = "RED"
pprint(color, "%s" % (ret))
pprint(color, "%s" % str(ret))
test("fun6(math, h)", "math.h")
test("fun6(math, h)", ("<", "math.h"))
def test(x, result):
toks = c_preproc.tokenize(x)

View File

@ -682,7 +682,8 @@ def extract_include(txt, defs):
return '"', toks[0][1]
else:
if toks[0][1] == '<' and toks[-1][1] == '>':
return stringize(toks).lstrip('<').rstrip('>')
ret = '<', stringize(toks).lstrip('<').rstrip('>')
return ret
raise PreprocError("could not parse include %s." % txt)