mirror of
https://github.com/python/cpython.git
synced 2025-11-02 19:12:55 +00:00
Don't export the SPB type as "SPB", because it shadows the method SPB,
which is really important. This is a stopgap measure, as only the generated C code is adapted. Fixes #776533.
This commit is contained in:
parent
f31bd453a5
commit
d1f46c8970
1 changed files with 3 additions and 0 deletions
|
|
@ -1150,8 +1150,11 @@ void init_Snd(void)
|
||||||
PyModule_AddObject(m, "SndChannelType", (PyObject *)&SndChannel_Type);
|
PyModule_AddObject(m, "SndChannelType", (PyObject *)&SndChannel_Type);
|
||||||
SPB_Type.ob_type = &PyType_Type;
|
SPB_Type.ob_type = &PyType_Type;
|
||||||
if (PyType_Ready(&SPB_Type) < 0) return;
|
if (PyType_Ready(&SPB_Type) < 0) return;
|
||||||
|
#if 0
|
||||||
|
/* This would shadow the SPB routine, which is bad news (it is important) */
|
||||||
Py_INCREF(&SPB_Type);
|
Py_INCREF(&SPB_Type);
|
||||||
PyModule_AddObject(m, "SPB", (PyObject *)&SPB_Type);
|
PyModule_AddObject(m, "SPB", (PyObject *)&SPB_Type);
|
||||||
|
#endif
|
||||||
/* Backward-compatible name */
|
/* Backward-compatible name */
|
||||||
Py_INCREF(&SPB_Type);
|
Py_INCREF(&SPB_Type);
|
||||||
PyModule_AddObject(m, "SPBType", (PyObject *)&SPB_Type);
|
PyModule_AddObject(m, "SPBType", (PyObject *)&SPB_Type);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue