diff options
author | Fred Drake <fdrake@acm.org> | 2000-07-06 19:38:49 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2000-07-06 19:38:49 (GMT) |
commit | 589c35bcc7ee2448507cedf303e3b72ede34b6ce (patch) | |
tree | 88a6da6e3476bc44a4da27f7dedcb5b65d29861a /Modules/pcremodule.c | |
parent | 28067821e28ddc03687818334b83a0d312265575 (diff) | |
download | cpython-589c35bcc7ee2448507cedf303e3b72ede34b6ce.zip cpython-589c35bcc7ee2448507cedf303e3b72ede34b6ce.tar.gz cpython-589c35bcc7ee2448507cedf303e3b72ede34b6ce.tar.bz2 |
Python 2.0 is not supposed to use string exceptions in the standard library
& extensions, so create exceptions in extension modules using the
PyErr_NewException() API.
Diffstat (limited to 'Modules/pcremodule.c')
-rw-r--r-- | Modules/pcremodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/pcremodule.c b/Modules/pcremodule.c index 901f674..6fb2d07 100644 --- a/Modules/pcremodule.c +++ b/Modules/pcremodule.c @@ -654,7 +654,7 @@ initpcre() /* Add some symbolic constants to the module */ d = PyModule_GetDict(m); - ErrorObject = PyString_FromString("pcre.error"); + ErrorObject = PyErr_NewException("pcre.error", NULL, NULL); PyDict_SetItemString(d, "error", ErrorObject); /* Insert the flags */ |