Commit eb31e9d6 authored by Larry Hastings's avatar Larry Hastings

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

now more accurate.
parent 3f144c2a
......@@ -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.
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment