diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-04-06 03:34:09 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-04-06 03:34:09 (GMT) |
commit | e266d3e804b0f27aa4f63d321372ed926cc45aab (patch) | |
tree | 971840d4b4d3741fe1cb0f8e3de8978f916db881 | |
parent | 021f334b9fe620a33b286ea15ab9f45e32938100 (diff) | |
download | cpython-e266d3e804b0f27aa4f63d321372ed926cc45aab.zip cpython-e266d3e804b0f27aa4f63d321372ed926cc45aab.tar.gz cpython-e266d3e804b0f27aa4f63d321372ed926cc45aab.tar.bz2 |
ready _sre types
-rw-r--r-- | Modules/_sre.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/_sre.c b/Modules/_sre.c index 2cf9705..eda30c4 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) |