https://github.com/python/cpython/commit/13f09a60f4d6fca019bff9dec05dabe5ad390d21
commit: 13f09a60f4d6fca019bff9dec05dabe5ad390d21
branch: main
author: Dino Viehland <[email protected]>
committer: DinoV <[email protected]>
date: 2025-11-06T07:16:56-08:00
summary:
gh-141150: Don't rely on implicit conversion from void * to pointer in
_PyModule… (#141147)
Don't rely on implicit conversion from void * to pointer in _PyModule_GetToken
files:
M Include/internal/pycore_moduleobject.h
diff --git a/Include/internal/pycore_moduleobject.h
b/Include/internal/pycore_moduleobject.h
index c34e42e826e476..6eef6eaa5df844 100644
--- a/Include/internal/pycore_moduleobject.h
+++ b/Include/internal/pycore_moduleobject.h
@@ -53,7 +53,7 @@ static inline PyModuleDef *_PyModule_GetDefOrNull(PyObject
*arg) {
static inline PyModuleDef *_PyModule_GetToken(PyObject *arg) {
PyModuleObject *mod = _PyModule_CAST(arg);
- return mod->md_token;
+ return (PyModuleDef *)mod->md_token;
}
static inline void* _PyModule_GetState(PyObject* mod) {
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]