Commit 30fd33e8 authored by Jeremy Hylton's avatar Jeremy Hylton

Use PyInt_AS_LONG after explicit PyInt_Check().

parent 5bf063c2
#define KEYMACROS_H "$Id: intkeymacros.h,v 1.6 2001/04/03 15:02:17 jim Exp $\n"
#define KEYMACROS_H "$Id: intkeymacros.h,v 1.7 2001/10/10 20:36:58 jeremy Exp $\n"
#define KEY_TYPE int
#define KEY_CHECK PyInt_Check
......@@ -9,6 +9,6 @@
#define COPY_KEY(KEY, E) (KEY=(E))
#define COPY_KEY_TO_OBJECT(O, K) O=PyInt_FromLong(K)
#define COPY_KEY_FROM_ARG(TARGET, ARG, STATUS) \
if (PyInt_Check(ARG)) TARGET=PyInt_AsLong(ARG); else { \
if (PyInt_Check(ARG)) TARGET=PyInt_AS_LONG(ARG); else { \
PyErr_SetString(PyExc_TypeError, "expected integer key"); \
(STATUS)=0; (TARGET)=0; }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment