From: Benjamin Peterson Date: Tue, 6 Apr 2010 03:34:09 +0000 (+0000) Subject: ready _sre types X-Git-Tag: v2.7b1~45 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e266d3e804b0f27aa4f63d321372ed926cc45aab;p=thirdparty%2FPython%2Fcpython.git ready _sre types --- diff --git a/Modules/_sre.c b/Modules/_sre.c index 2cf97051eb1d..eda30c465bd1 100644 --- a/Modules/_sre.c +++ b/Modules/_sre.c @@ -3876,8 +3876,9 @@ PyMODINIT_FUNC init_sre(void) PyObject* x; /* Patch object types */ - Pattern_Type.ob_type = Match_Type.ob_type = - Scanner_Type.ob_type = &PyType_Type; + if (PyType_Ready(&Pattern_Type) || PyType_Ready(&Match_Type) || + PyType_Ready(&Scanner_Type)) + return; m = Py_InitModule("_" SRE_MODULE, _functions); if (m == NULL)