[Python-Dev] .clinic.c vs .c.clinic (original) (raw)
Ethan Furman ethan at stoneleaf.us
Mon Jan 20 22:47:28 CET 2014
- Previous message: [Python-Dev] .clinic.c vs .c.clinic
- Next message: [Python-Dev] .clinic.c vs .c.clinic
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 01/20/2014 12:14 PM, Georg Brandl wrote:
Am 20.01.2014 21:05, schrieb Ethan Furman:
On 01/20/2014 11:46 AM, Brett Cannon wrote:
On Mon, Jan 20, 2014 at 2:09 PM, Barry Warsaw wrote:
On Jan 20, 2014, at 12:05 AM, Larry Hastings wrote:
Contestant 5: "Put in clinic directory, add .h"
foo.c -> clinic/foo.c.h foo.h -> clinic/foo.h.h This is cached output right? Yes, it's generated entirely based on data provided in original source file. IOW, it can be regenerated if it's missing. If so, this seems like a nice parallel to pycache. It's mostly hidden until you want to go looking for it. More-or-less. The key difference is you will most likely look at the generated file once to copy-and-paste the relevant macros to paste into your source file for use (e.g. the relevant MethodDef stuff). But it's a one-time thing that never has to be done again as long as you don't rename a function or method. Won't AC put those macros in the source file for you? No, currently it wouldn't know where to look. And that's a good thing because AC never should modify anything not inbetween "clinic start generated code" and "clinic end generated code".
So, if I understand correctly, by moving into a sidefile approach, we will have go to a two-pass system? Once to ACify the file and run Argument Clinic on it, and then again to add in the macros?
Is this basically the same as it was with the buffer approach?
--
Ethan
- Previous message: [Python-Dev] .clinic.c vs .c.clinic
- Next message: [Python-Dev] .clinic.c vs .c.clinic
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]