ready _sre types

This commit is contained in:
Benjamin Peterson 2010-04-06 03:34:09 +00:00
parent 021f334b9f
commit e266d3e804
1 changed files with 3 additions and 2 deletions

View File

@ -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)