[issue6953] readline documenation needs work
stefanholek
report at bugs.python.org
Tue Mar 9 22:24:17 CET 2010
stefanholek <stefan at epy.co.at> added the comment:
To be zero-based, get_history_item would need to look like:
diff --git a/rl/readline.c b/rl/readline.c
index 33e9905..800bc00 100644
--- a/rl/readline.c
+++ b/rl/readline.c
@@ -559,7 +559,7 @@ get_history_item(PyObject *self, PyObject *args)
if (!PyArg_ParseTuple(args, "i:index", &idx))
return NULL;
- if ((hist_ent = history_get(idx)))
+ if ((hist_ent = history_get(history_base + idx)))
return PyString_FromString(hist_ent->line);
else {
Py_RETURN_NONE;
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6953>
_______________________________________
More information about the Python-bugs-list
mailing list