summaryrefslogtreecommitdiffstats
path: root/Modules/arraymodule.c
diff options
context:
space:
mode:
authorJason Tishler <jason@tishler.net>2003-01-06 12:41:26 (GMT)
committerJason Tishler <jason@tishler.net>2003-01-06 12:41:26 (GMT)
commitfb8595df4f9583ab9e83826cd782e0c18ba9cffa (patch)
treefb178c5308b141f5285fd5b0bb560da02ee8c64c /Modules/arraymodule.c
parentf2128b004c5cac7ae8766329b061867de6fb6093 (diff)
downloadcpython-fb8595df4f9583ab9e83826cd782e0c18ba9cffa.zip
cpython-fb8595df4f9583ab9e83826cd782e0c18ba9cffa.tar.gz
cpython-fb8595df4f9583ab9e83826cd782e0c18ba9cffa.tar.bz2
Patch #661760: Cygwin auto-import module patch
The attached patch enables shared extension modules to build cleanly under Cygwin without moving the static initialization of certain function pointers (i.e., ones exported from the Python DLL core) to a module initialization function. Additionally, this patch fixes the modules that have been changed in the past to accommodate Cygwin.
Diffstat (limited to 'Modules/arraymodule.c')
-rw-r--r--Modules/arraymodule.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c
index 933eae0..03447cb 100644
--- a/Modules/arraymodule.c
+++ b/Modules/arraymodule.c
@@ -13,8 +13,6 @@
#endif /* DONT_HAVE_SYS_TYPES_H */
#endif /* !STDC_HEADERS */
-#define DELAYED(X) 0
-
struct arrayobject; /* Forward */
/* All possible arraydescr values are defined in the vector "descriptors"
@@ -1842,7 +1840,7 @@ static PyTypeObject Arraytype = {
0, /* tp_hash */
0, /* tp_call */
0, /* tp_str */
- DELAYED(PyObject_GenericGetAttr), /* tp_getattro */
+ PyObject_GenericGetAttr, /* tp_getattro */
0, /* tp_setattro */
&array_as_buffer, /* tp_as_buffer*/
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
@@ -1862,9 +1860,9 @@ static PyTypeObject Arraytype = {
0, /* tp_descr_set */
0, /* tp_dictoffset */
0, /* tp_init */
- DELAYED(PyType_GenericAlloc), /* tp_alloc */
+ PyType_GenericAlloc, /* tp_alloc */
array_new, /* tp_new */
- DELAYED(PyObject_Del), /* tp_free */
+ PyObject_Del, /* tp_free */
};
/* No functions in array module. */
@@ -1879,9 +1877,6 @@ initarray(void)
PyObject *m;
Arraytype.ob_type = &PyType_Type;
- Arraytype.tp_getattro = PyObject_GenericGetAttr;
- Arraytype.tp_alloc = PyType_GenericAlloc;
- Arraytype.tp_free = PyObject_Del;
m = Py_InitModule3("array", a_methods, module_doc);
Py_INCREF((PyObject *)&Arraytype);