From: Mark Wooding Date: Sun, 20 Oct 2019 18:17:41 +0000 (+0100) Subject: pyke/pyke.h, key.c: Rename `INDEXERR' to `MAPERR'. X-Git-Url: https://git.distorted.org.uk/~mdw/pyke/commitdiff_plain/fcfa1c8692de00ec31dfedf5614428df571b7441 pyke/pyke.h, key.c: Rename `INDEXERR' to `MAPERR'. The name `INDEXERR' was pointlessly confusing, given the existing `IXERR' which actually raises Python's `IndexError'. It's important, though, that `KEYERR' be reserved for Catacomb's `KeyError' exception, which really is an error about (cryptographic) keys. So `MAPERR' it is. --- diff --git a/pyke.h b/pyke.h index 1f6232c..4e67464 100644 --- a/pyke.h +++ b/pyke.h @@ -86,7 +86,7 @@ PRIVATE_SYMBOLS; #define ZDIVERR(str) EXCERR(PyExc_ZeroDivisionError, str) #define SYSERR(str) EXCERR(PyExc_SystemError, str) #define NIERR(str) EXCERR(PyExc_NotImplementedError, str) -#define INDEXERR(idx) do { \ +#define MAPERR(idx) do { \ PyErr_SetObject(PyExc_KeyError, idx); \ goto end; \ } while (0)