diff options
author | Guido van Rossum <guido@python.org> | 2007-01-14 03:31:43 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-01-14 03:31:43 (GMT) |
commit | ddefaf31b366ea84250fc5090837c2b764a04102 (patch) | |
tree | ab3d7b5172f4e6a064165468fc70beb41bdca1d3 /Modules/_cursesmodule.c | |
parent | 5b787e8bc2dbda5583eee039cb6a6e47c8d8a034 (diff) | |
download | cpython-ddefaf31b366ea84250fc5090837c2b764a04102.zip cpython-ddefaf31b366ea84250fc5090837c2b764a04102.tar.gz cpython-ddefaf31b366ea84250fc5090837c2b764a04102.tar.bz2 |
Merged the int/long unification branch, by very crude means (sorry Thomas!).
I banged on the code (beyond what's in that branch) to make fewer tests fail;
the only tests that fail now are:
test_descr -- can't pickle ints?!
test_pickletools -- ???
test_socket -- See python.org/sf/1619659
test_sqlite -- ???
I'll deal with those later.
Diffstat (limited to 'Modules/_cursesmodule.c')
-rw-r--r-- | Modules/_cursesmodule.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index aeb1ef5..19c3b26 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -193,7 +193,7 @@ PyCursesCheckERR(int code, char *fname) static int PyCurses_ConvertToChtype(PyObject *obj, chtype *ch) { - if (PyInt_Check(obj)) { + if (PyInt_CheckExact(obj)) { *ch = (chtype) PyInt_AsLong(obj); } else if(PyString_Check(obj) && (PyString_Size(obj) == 1)) { @@ -2364,7 +2364,7 @@ PyCurses_UnCtrl(PyObject *self, PyObject *args) if (!PyArg_ParseTuple(args,"O;ch or int",&temp)) return NULL; - if (PyInt_Check(temp)) + if (PyInt_CheckExact(temp)) ch = (chtype) PyInt_AsLong(temp); else if (PyString_Check(temp)) ch = (chtype) *PyString_AsString(temp); @@ -2386,7 +2386,7 @@ PyCurses_UngetCh(PyObject *self, PyObject *args) if (!PyArg_ParseTuple(args,"O;ch or int",&temp)) return NULL; - if (PyInt_Check(temp)) + if (PyInt_CheckExact(temp)) ch = (int) PyInt_AsLong(temp); else if (PyString_Check(temp)) ch = (int) *PyString_AsString(temp); |