summaryrefslogtreecommitdiffstats
path: root/Modules/arraymodule.c
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-02-04 20:33:49 (GMT)
committerFred Drake <fdrake@acm.org>2000-02-04 20:33:49 (GMT)
commit0d40ba4cdf6899b126297848f27f07a9cc76acb9 (patch)
tree4bc282696edbf934303c7db230540a2c4638a5c0 /Modules/arraymodule.c
parent0fdffcf9163c7d5dd18f74f7fad50d42fec60c3d (diff)
downloadcpython-0d40ba4cdf6899b126297848f27f07a9cc76acb9.zip
cpython-0d40ba4cdf6899b126297848f27f07a9cc76acb9.tar.gz
cpython-0d40ba4cdf6899b126297848f27f07a9cc76acb9.tar.bz2
Patch from Paul Sokolovsky <Paul.Sokolovsky@technologist.com>:
Attached is patch (against 1.5.2 release) to allow some modules to be buildable as pyd's (usual &PyType_Type stuff).
Diffstat (limited to 'Modules/arraymodule.c')
-rw-r--r--Modules/arraymodule.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c
index 396b9cf..dcd931b 100644
--- a/Modules/arraymodule.c
+++ b/Modules/arraymodule.c
@@ -1448,7 +1448,7 @@ itemsize -- the length in bytes of one array item\n\
";
statichere PyTypeObject Arraytype = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0,
"array",
sizeof(arrayobject),
@@ -1476,6 +1476,8 @@ DL_EXPORT(void)
initarray()
{
PyObject *m, *d;
+
+ Arraytype.ob_type = &PyType_Type;
m = Py_InitModule3("array", a_methods, module_doc);
d = PyModule_GetDict(m);
PyDict_SetItemString(d, "ArrayType", (PyObject *)&Arraytype);