From e266d3e804b0f27aa4f63d321372ed926cc45aab Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 6 Apr 2010 03:34:09 +0000 Subject: [PATCH] ready _sre types --- Modules/_sre.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Modules/_sre.c b/Modules/_sre.c index 2cf97051eb..eda30c465b 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) -- 2.50.1