diff options
author | Jim Fulton <jim@zope.com> | 2003-06-28 11:53:29 (GMT) |
---|---|---|
committer | Jim Fulton <jim@zope.com> | 2003-06-28 11:53:29 (GMT) |
commit | 4b59f9165de726c6850357fc3e1d19f590e98102 (patch) | |
tree | 8ab54af5e537a9156ab0938f953ee81e179aa34b /Doc/ext | |
parent | db6a569de7ae595ada53b618fce6bbbd1c98d350 (diff) | |
download | cpython-4b59f9165de726c6850357fc3e1d19f590e98102.zip cpython-4b59f9165de726c6850357fc3e1d19f590e98102.tar.gz cpython-4b59f9165de726c6850357fc3e1d19f590e98102.tar.bz2 |
Changed the assignment of PyType_GenericNew to tp_new slot. Now do
this in module initialization before calling PyType_Ready. (Sorry
Tim.) This is necessary to compile on cygwin. AFAIK, we support
cygwin. If so, then we need to write extentions this way.
Diffstat (limited to 'Doc/ext')
-rw-r--r-- | Doc/ext/noddy.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/Doc/ext/noddy.c b/Doc/ext/noddy.c index 632d8e1..ec2d669 100644 --- a/Doc/ext/noddy.c +++ b/Doc/ext/noddy.c @@ -28,23 +28,6 @@ static PyTypeObject noddy_NoddyType = { 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT, /*tp_flags*/ "Noddy objects", /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - 0, /* tp_iter */ - 0, /* tp_iternext */ - 0, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - PyType_GenericNew, /* tp_new */ }; static PyMethodDef noddy_methods[] = { @@ -59,6 +42,7 @@ initnoddy(void) { PyObject* m; + noddy_NoddyType.tp_new = PyType_GenericNew; if (PyType_Ready(&noddy_NoddyType) < 0) return; |