fix: handle possible PyModule_AddObject failure
Comment from Python documentation: Unlike other functions that steal references, `PyModule_AddObject()` only decrements the reference count of value on success. This means that its return value must be checked, and calling code must `Py_DECREF()` value manually on error.
Showing
想要评论请 注册 或 登录