pyke/pyke.h, key.c: Rename `INDEXERR' to `MAPERR'.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 20 Oct 2019 18:17:41 +0000 (19:17 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 11 Apr 2020 11:44:14 +0000 (12:44 +0100)
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.

pyke.h

diff --git a/pyke.h b/pyke.h
index 1f6232c..4e67464 100644 (file)
--- 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)