Issue #20143: The line numbers reported in Argument Clinic errors are

now more accurate.
This commit is contained in:
Larry Hastings 2014-01-06 11:10:08 -08:00
parent 3f144c2ad7
commit eb31e9d6ed
2 changed files with 6 additions and 2 deletions

View File

@ -16,6 +16,9 @@ Library
Tools/Demos
-----------
- Issue #20143: The line numbers reported in Argument Clinic errors are
now more accurate.
- Issue #20142: Py_buffer variables generated by Argument Clinic are now
initialized with a default value.

View File

@ -943,8 +943,9 @@ class BlockParser:
fail("Checksum mismatch!\nExpected: {}\nComputed: {}".format(checksum, computed))
else:
# put back output
self.input.extend(reversed(output.splitlines(keepends=True)))
self.line_number -= len(output)
output_lines = output.splitlines(keepends=True)
self.line_number -= len(output_lines)
self.input.extend(reversed(output_lines))
output = None
return Block(input_output(), dsl_name, output=output)