Mercurial > cpython-lru_cache-weakref
diff Mac/Modules/macmodule.c @ 6442:ddfcefc0d826 legacy-trunk
New exception interface
| author | Jack Jansen <jack.jansen@cwi.nl> |
|---|---|
| date | Tue, 07 Oct 1997 21:47:25 +0000 |
| parents | ac235c9e6881 |
| children | 3de0cb82e61a |
line wrap: on
line diff
--- a/Mac/Modules/macmodule.c Tue Oct 07 21:22:48 1997 +0000 +++ b/Mac/Modules/macmodule.c Tue Oct 07 21:47:25 1997 +0000 @@ -630,7 +630,6 @@ d = PyModule_GetDict(m); /* Initialize mac.error exception */ - MacError = PyString_FromString("mac.error"); - if (MacError == NULL || PyDict_SetItemString(d, "error", MacError) != 0) - Py_FatalError("can't define mac.error"); + MacError = PyErr_NewException("mac.error", NULL, NULL); + PyDict_SetItemString(d, "error", MacError); }
