We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e566ab commit 4ccf119Copy full SHA for 4ccf119
1 file changed
Modules/regexmodule.c
@@ -660,8 +660,10 @@ initregex(void)
660
m = Py_InitModule("regex", regex_global_methods);
661
d = PyModule_GetDict(m);
662
663
- PyErr_Warn(PyExc_DeprecationWarning,
664
- "the regex module is deprecated; please use the re module");
+ if (PyErr_Warn(PyExc_DeprecationWarning,
+ "the regex module is deprecated; "
665
+ "please use the re module") < 0)
666
+ return NULL;
667
668
/* Initialize regex.error exception */
669
v = RegexError = PyErr_NewException("regex.error", NULL, NULL);
0 commit comments