summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2002-12-31 21:55:16 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2002-12-31 21:55:16 (GMT)
commit13af1142fcedc7b6022e32026e5f2768ae7eda03 (patch)
treeaa152c10cb967e60c5f34908aa7e561250cc8789
parentbbe8961698de3a4e3e17512b6e88e9d7fcd52d4e (diff)
downloadcpython-13af1142fcedc7b6022e32026e5f2768ae7eda03.zip
cpython-13af1142fcedc7b6022e32026e5f2768ae7eda03.tar.gz
cpython-13af1142fcedc7b6022e32026e5f2768ae7eda03.tar.bz2
Try to get compilation working for cygwin
-rw-r--r--Modules/_randommodule.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/Modules/_randommodule.c b/Modules/_randommodule.c
index 35f10a5..1b96dc8 100644
--- a/Modules/_randommodule.c
+++ b/Modules/_randommodule.c
@@ -486,7 +486,7 @@ static PyTypeObject Random_Type = {
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
+ 0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
@@ -506,9 +506,9 @@ static PyTypeObject Random_Type = {
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
0, /*tp_init*/
- PyType_GenericAlloc, /*tp_alloc*/
+ 0, /*tp_alloc*/
random_new, /*tp_new*/
- _PyObject_Del, /*tp_free*/
+ 0, /*tp_free*/
0, /*tp_is_gc*/
};
@@ -520,6 +520,9 @@ init_random(void)
{
PyObject *m;
+ Random_Type.tp_getattro = PyObject_GenericGetAttr;
+ Random_Type.tp_alloc = PyType_GenericAlloc;
+ Random_Type.tp_free = _PyObject_Del;
if (PyType_Ready(&Random_Type) < 0)
return;
m = Py_InitModule3("_random", NULL, module_doc);