Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
Argument Clinic does not work with custom destination files, for example given this clinic input:
destination test new file test.c.houtput pushoutput methoddef_define testoutput parser_prototype testoutput docstring_prototype testTraceback
$python3.11 Tools/clinic/clinic.py -f test.cError in file "test.c" on line 224:Exception raised during parsing:Traceback (most recent call last): File "Tools/clinic/clinic.py", line 2030, in parse parser.parse(block) ^^^^^^^^^^^^^^^^^^^ File "Tools/clinic/clinic.py", line 4176, in parse block.output.extend(self.clinic.language.render(clinic, block.signatures)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "Tools/clinic/clinic.py", line 614, in render return self.render_function(clinic, function) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "Tools/clinic/clinic.py", line 1453, in render_function destination.append(s) ^^^^^^^^^^^^^^^^^^^^^AttributeError: 'Destination' object has no attribute 'append'
This occurs because AC tries to append to a buffer (clinic.destination_buffers), but it receives aDestination object instead. The failure is in theoutput directive parser; it incorrectly updatesclinic.destination_buffers with thedestination object, instead of using the result ofclinic.get_destination_buffer.