summaryrefslogtreecommitdiffstats
path: root/Modules/_testbuffer.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2024-04-02 10:59:21 (GMT)
committerGitHub <noreply@github.com>2024-04-02 10:59:21 (GMT)
commitc32dc47aca6e8fac152699bc613e015c44ccdba9 (patch)
treee183f7c56ad5e081879c3dd75f7e11887fe7e26c /Modules/_testbuffer.c
parentc97d3af2391e62ef456ef2365d48ab9b8cdbe27b (diff)
downloadcpython-c32dc47aca6e8fac152699bc613e015c44ccdba9.zip
cpython-c32dc47aca6e8fac152699bc613e015c44ccdba9.tar.gz
cpython-c32dc47aca6e8fac152699bc613e015c44ccdba9.tar.bz2
GH-115776: Embed the values array into the object, for "normal" Python objects. (GH-116115)
Diffstat (limited to 'Modules/_testbuffer.c')
-rw-r--r--Modules/_testbuffer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/_testbuffer.c b/Modules/_testbuffer.c
index 5084bca..cad21bd 100644
--- a/Modules/_testbuffer.c
+++ b/Modules/_testbuffer.c
@@ -2820,6 +2820,9 @@ static int
_testbuffer_exec(PyObject *mod)
{
Py_SET_TYPE(&NDArray_Type, &PyType_Type);
+ if (PyType_Ready(&NDArray_Type)) {
+ return -1;
+ }
if (PyModule_AddType(mod, &NDArray_Type) < 0) {
return -1;
}