Message194677
> This code in the beginning in PyInit__elementtree:
>
> m = PyState_FindModule(&elementtreemodule);
> if (m) {
> Py_INCREF(m);
> return m;
> }
>
> Can you explain what use case it tries to cover? I couldn't find
> similar code in other modules we have that implement PEP 3121 (_csv,
> readline, io, etc.)
I don't know :-) I just re-used Robin's original patch.
> >> I don't see a call to PyState_AddModule. What am I missing?
> >It is called implicitly when an extension module is imported.
>
> Do you think this should be documented in the C API docs? The way
> they read now, it seems that calling PyState_AddModule is needed
> manually by extension writers.
Well, how to deal with module state should probably be better
documented. Not sure how, though. |
|
Date |
User |
Action |
Args |
2013-08-08 14:00:10 | pitrou | set | recipients:
+ pitrou, effbot, Arfrever, eli.bendersky, asvetlov, Robin.Schreiber |
2013-08-08 14:00:10 | pitrou | link | issue15651 messages |
2013-08-08 14:00:10 | pitrou | create | |
|