diff options
author | Guido van Rossum <guido@python.org> | 2006-08-17 05:42:55 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2006-08-17 05:42:55 (GMT) |
commit | 50e9fb9e2d6b4b12524116ab775ac6543e4a5332 (patch) | |
tree | 96f41e9a6d07a2754fcaceb7b54a7c11f112687f /Modules/_sre.c | |
parent | d033ddf4dc501e0920adec9e193750e515bbd128 (diff) | |
download | cpython-50e9fb9e2d6b4b12524116ab775ac6543e4a5332.zip cpython-50e9fb9e2d6b4b12524116ab775ac6543e4a5332.tar.gz cpython-50e9fb9e2d6b4b12524116ab775ac6543e4a5332.tar.bz2 |
Completely get rid of PyClass and PyInstance.
(classobject.[ch] aren't empty yet because they also define PyMethod.)
This breaks lots of stuff, notably cPickle. But it's a step in the right
direction. I'll clean it up later.
(Also a few unrelated changes, e.g. T_NONE to define a "struct member"
that is always None, and simplification of __hash__ -- these are unfinished.)
Diffstat (limited to 'Modules/_sre.c')
-rw-r--r-- | Modules/_sre.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Modules/_sre.c b/Modules/_sre.c index 68d511e..6f1e2b6 100644 --- a/Modules/_sre.c +++ b/Modules/_sre.c @@ -3363,19 +3363,19 @@ static PyMethodDef _functions[] = { {NULL, NULL} }; -#if PY_VERSION_HEX < 0x02030000 -DL_EXPORT(void) init_sre(void) -#else PyMODINIT_FUNC init_sre(void) -#endif { PyObject* m; PyObject* d; PyObject* x; - /* Patch object types */ - Pattern_Type.ob_type = Match_Type.ob_type = - Scanner_Type.ob_type = &PyType_Type; + /* Initialize object types */ + if (PyType_Ready(&Pattern_Type) < 0) + return; + if (PyType_Ready(&Match_Type) < 0) + return; + if (PyType_Ready(&Scanner_Type) < 0) + return; m = Py_InitModule("_" SRE_MODULE, _functions); if (m == NULL) |