Author pitrou
Recipients brett.cannon, eric.snow, loewis, ncoghlan, pitrou, sbt
Date 2013-08-06.21:37:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1375825064.19.0.13296104467.issue18674@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-08-06 21:37:44pitrousetrecipients: + pitrou, loewis, brett.cannon, ncoghlan, sbt, eric.snow
2013-08-06 21:37:44pitrousetmessageid: <1375825064.19.0.13296104467.issue18674@psf.upfronthosting.co.za>
2013-08-06 21:37:44pitroulinkissue18674 messages
2013-08-06 21:37:44pitroucreate