Message75239
| Author |
loewis |
| Recipients |
barry, christian.heimes, grahamd, loewis |
| Date |
2008年10月26日.18:36:12 |
| SpamBayes Score |
3.0456886e-06 |
| Marked as misclassified |
No |
| Message-id |
<1225046174.16.0.946023521398.issue4200@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|