Message194584
Theoretically, people *should* already incref the result from PyState_FindModule. On the other hand, the object currently wouldn't be lost unless something else calls PyState_RemoveModule(), which is hardly every used AFAICT.
The only saving grace is that PyState_FindModule() is py3-specific, and only used for extension modules which have a positive m_size (probably not many of them yet).
(I think this issue teaches us that borrowed ref-returning APIs are a bad idea)
Unfortunately, without this change, we also make it difficult or impossible to reclaim extension modules using the GC. At least I cannot think of another way. |
|
Date |
User |
Action |
Args |
2013-08-06 21:37:44 | pitrou | set | recipients:
+ pitrou, loewis, brett.cannon, ncoghlan, sbt, eric.snow |
2013-08-06 21:37:44 | pitrou | set | messageid: <1375825064.19.0.13296104467.issue18674@psf.upfronthosting.co.za> |
2013-08-06 21:37:44 | pitrou | link | issue18674 messages |
2013-08-06 21:37:44 | pitrou | create | |
|