[Python-checkins] bpo-38321: Fix compiler warning in _randommodule.c (GH-16512)

Victor Stinner webhook-mailer at python.org
Tue Oct 1 06:45:56 EDT 2019


https://github.com/python/cpython/commit/2f90261280e36a179831d72ce794115be31c88bb
commit: 2f90261280e36a179831d72ce794115be31c88bb
branch: master
author: Victor Stinner <vstinner at redhat.com>
committer: GitHub <noreply at github.com>
date: 2019年10月01日T12:45:52+02:00
summary:
bpo-38321: Fix compiler warning in _randommodule.c (GH-16512)
Fix the GCC warning: "initialization discards ‘const’ qualifier from
pointer target type".
files:
M Modules/_randommodule.c
diff --git a/Modules/_randommodule.c b/Modules/_randommodule.c
index 1ea2bf28abcca..1f4bf74fc7a1e 100644
--- a/Modules/_randommodule.c
+++ b/Modules/_randommodule.c
@@ -543,7 +543,7 @@ PyDoc_STRVAR(random_doc,
 "Random() -> create a random number generator with its own internal state.");
 
 static PyType_Slot Random_Type_slots[] = {
- {Py_tp_doc, random_doc},
+ {Py_tp_doc, (void *)random_doc},
 {Py_tp_methods, random_methods},
 {Py_tp_new, random_new},
 {Py_tp_free, PyObject_Free},


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /