]> granicus.if.org Git - python/commit
Issue #9566: Fix pyparse.xmlparser.ParseFile()
authorVictor Stinner <victor.stinner@haypocalc.com>
Mon, 10 Jan 2011 23:00:36 +0000 (23:00 +0000)
committerVictor Stinner <victor.stinner@haypocalc.com>
Mon, 10 Jan 2011 23:00:36 +0000 (23:00 +0000)
commit95f1dfc955310c86398fbb430274ec36aa0daad4
tree11ef7d63060df0710f97800f0fb3c3eae911c5d7
parent9971e001ef3aa41aa86528a36e038b1659c753c9
Issue #9566: Fix pyparse.xmlparser.ParseFile()

Fix readinst() if file.read(n) returns a bytes object longer than n:
return -1 instead of the the buffer size to raise an exception.
Simplify also the function code.
Modules/pyexpat.c