(original) (raw)
On 01/14/2014 05:32 PM, Ryan Smith-Roberts wrote:
Pondering it this afternoon, I thought of a configuration that minimizes both code churn and readability impact: two buffers. One at the top containing forward declarations and defines (an inline header file if you like), and the rest of the autogenerated code at the bottom. It's not obvious that AC currently supports this configuration, or backtracking of any kind.
Clinic is strictly one pass currently. I could add this feature to the prototype if there was sufficient interest; for now, I'd accept a patch to the clinic-buffer-samples repo adding a sample of your proposal. Please start with "\_pickle.original.c", and add simulated (but deliberately invalid!) Clinic instructions for an authentic flair. I suggest the name "forward" for the destination, and "\_pickle.using-forward.buffer.c" for the filename.
I take it "forward" would get the methoddef\_define, the docstring\_prototype, and the parser\_prototype, "block" would get the impl\_prototype, and "buffer" would get the docstring\_definition and the parser\_definition?
I'm happy to collect votes for this approach too. I'll put you down as a +1
/arry