Skip to content

Commit

Permalink
Python script checkdocs.py now works both on Python 2 and Python 3.
Browse files Browse the repository at this point in the history
  • Loading branch information
gjvnq committed Nov 27, 2016
1 parent 520ab88 commit fa302fa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/checkdocs.py
Expand Up @@ -207,9 +207,10 @@ def parse_all_headers():
for header in headers:
p = subprocess.Popen(options.compiler + " -E -dD - " + includes,
stdout=subprocess.PIPE, stdin=subprocess.PIPE, shell=True)
p.stdin.write(bytes("#include <allegro5/allegro.h>\n" + open(header).read(), encoding="UTF-8"))
filename = "#include <allegro5/allegro.h>\n" + open(header).read()
p.stdin.write(filename.encode('utf-8'))
p.stdin.close()
text = str(p.stdout.read(), encoding="UTF-8")
text = p.stdout.read().decode("utf-8")
parse_header(text.splitlines(), header)
#print("%d definitions in %s" % (n, header))

Expand Down

0 comments on commit fa302fa

Please sign in to comment.