2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-20 04:42:28 +00:00

Applied patch by Christian Hudon

[SVN r25636]
This commit is contained in:
Bruno da Silva de Oliveira
2004-10-09 19:49:09 +00:00
parent 48a6db6598
commit 92ff4ab76f
2 changed files with 15 additions and 5 deletions

View File

@@ -1,3 +1,7 @@
9 October 2004
- Applied a patch by Christian Hudon that fixed an issue with files
that had a tail and relative includes.
18 July 2004
- Applied a patch by Paul Bridger that solves some problems for wrapper
methods.

View File

@@ -86,10 +86,16 @@ class CppParser:
'''Creates a temporary file, appends the text tail to it, and returns
the filename of the file.
'''
temp = tempfile.mktemp('.h')
shutil.copyfile(filename, temp)
f = file(temp, 'a')
f.write('\n\n'+tail)
if hasattr(tempfile, 'mkstemp'):
f_no, temp = tempfile.mkstemp('.h')
f = file(temp, 'a')
os.close(f_no)
else:
temp = tempfile.mktemp('.h')
f = file(temp, 'a')
f.write('#include "%s"\n\n' % os.path.abspath(filename))
f.write(tail)
f.write('\n')
f.close()
return temp
@@ -153,7 +159,7 @@ class CppParser:
'''
if tail is None:
tail = ''
tail.strip()
tail = tail.strip()
declarations = self.GetCache(header, interface, tail)
if declarations is None:
declarations = self.ParseWithGCCXML(header, tail)