diff options
Diffstat (limited to 'Modules/readline.c')
-rw-r--r-- | Modules/readline.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Modules/readline.c b/Modules/readline.c index c915327..d42998e 100644 --- a/Modules/readline.c +++ b/Modules/readline.c @@ -154,7 +154,7 @@ history truncation."); static PyObject* get_history_length(PyObject *self, PyObject *noarg) { - return PyInt_FromLong(_history_length); + return PyLong_FromLong(_history_length); } PyDoc_STRVAR(get_history_length_doc, @@ -271,7 +271,7 @@ static PyObject *endidx = NULL; static PyObject * get_completion_type(PyObject *self, PyObject *noarg) { - return PyInt_FromLong(rl_completion_type); + return PyLong_FromLong(rl_completion_type); } PyDoc_STRVAR(doc_get_completion_type, @@ -490,7 +490,7 @@ get_current_history_length(PyObject *self, PyObject *noarg) HISTORY_STATE *hist_st; hist_st = history_get_history_state(); - return PyInt_FromLong(hist_st ? (long) hist_st->length : (long) 0); + return PyLong_FromLong(hist_st ? (long) hist_st->length : (long) 0); } PyDoc_STRVAR(doc_get_current_history_length, @@ -628,7 +628,7 @@ on_hook(PyObject *func) if (r == Py_None) result = 0; else { - result = PyInt_AsLong(r); + result = PyLong_AsLong(r); if (result == -1 && PyErr_Occurred()) goto error; } @@ -688,7 +688,7 @@ on_completion_display_matches_hook(char **matches, Py_DECREF(m), m=NULL; if (r == NULL || - (r != Py_None && PyInt_AsLong(r) == -1 && PyErr_Occurred())) { + (r != Py_None && PyLong_AsLong(r) == -1 && PyErr_Occurred())) { goto error; } Py_XDECREF(r), r=NULL; @@ -752,8 +752,8 @@ flex_complete(char *text, int start, int end) { Py_XDECREF(begidx); Py_XDECREF(endidx); - begidx = PyInt_FromLong((long) start); - endidx = PyInt_FromLong((long) end); + begidx = PyLong_FromLong((long) start); + endidx = PyLong_FromLong((long) end); return completion_matches(text, *on_completion); } @@ -796,8 +796,8 @@ setup_readline(void) rl_completion_append_character ='\0'; #endif - begidx = PyInt_FromLong(0L); - endidx = PyInt_FromLong(0L); + begidx = PyLong_FromLong(0L); + endidx = PyLong_FromLong(0L); /* Initialize (allows .inputrc to override) * * XXX: A bug in the readline-2.2 library causes a memory leak |