This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients Robin.Schreiber, belopolsky, loewis
Date 2012-09-02.23:37:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
+#define xx_state_global 
+	((xxstate *)PyModule_GetState(PyState_FindModule(&xxmodule)))

This is unsafe: PyState_FindModule(&xxmodule) can return NULL.  I think code should account for this possibility and not use this macro.  For example, XxoObject_Check(v) should be defined as

(PyState_FindModule(&xxmodule) == NULL ? 0 : \
  (Py_TYPE(v) == xx_state(PyState_FindModule(&xxmodule))->Xxo_Type))

(Should this also check PyModule_GetState() return?)
Date User Action Args
2012-09-02 23:37:12belopolskysetrecipients: + belopolsky, loewis, Robin.Schreiber
2012-09-02 23:37:12belopolskysetmessageid: <>
2012-09-02 23:37:12belopolskylinkissue15849 messages
2012-09-02 23:37:11belopolskycreate