Message75239
It would certainly be possible to produce per-interpreter callback lists
through the module state. You declare a per-interpreter structure, add
its size into atexitmodule, and refer to it through PyModule_GetDef,
passing the self argument of the module-level functions.
Reviewing the code, I have two unrelated remarks:
- METH_NOARGS functions still take two arguments.
- I would drop the double-indirection of the callback list. Instead,
allocate a single block of atexit_callback, and use func==NULL as an
indicator that the block is free.
According to the documentation of the atexit module, it seems clear that
it is a per-interpreter thing. |
|
Date |
User |
Action |
Args |
2008-10-26 18:36:14 | loewis | set | recipients:
+ loewis, barry, christian.heimes, grahamd |
2008-10-26 18:36:14 | loewis | set | messageid: <1225046174.16.0.946023521398.issue4200@psf.upfronthosting.co.za> |
2008-10-26 18:36:12 | loewis | link | issue4200 messages |
2008-10-26 18:36:12 | loewis | create | |
|