[Python-checkins] python/dist/src/Modules readline.c,2.58,2.59
mwh@users.sourceforge.net
mwh@users.sourceforge.net
Thu, 30 Jan 2003 02:12:54 -0800
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv12271
Modified Files:
readline.c
Log Message:
Add the get_completer() function based on Michael Stone's patch in
[ 676342 ] after using pdb readline does not work correctly
which is required to fix that bug. So maaybe a bugfix candidate.
Index: readline.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/readline.c,v
retrieving revision 2.58
retrieving revision 2.59
diff -C2 -d -r2.58 -r2.59
*** readline.c 7 Jan 2003 20:31:20 -0000 2.58
--- readline.c 30 Jan 2003 10:12:51 -0000 2.59
***************
*** 351,354 ****
--- 351,370 ----
+ static PyObject *
+ get_completer(PyObject *self, PyObject *args)
+ {
+ if (completer == NULL) {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+ Py_INCREF(completer);
+ return completer;
+ }
+
+ PyDoc_STRVAR(doc_get_completer,
+ "get_completer() -> function\n\
+ \n\
+ Returns current completer function.");
+
/* Exported function to get any element of history */
***************
*** 460,463 ****
--- 476,480 ----
METH_VARARGS, get_history_length_doc},
{"set_completer", set_completer, METH_VARARGS, doc_set_completer},
+ {"get_completer", get_completer, METH_NOARGS, doc_get_completer},
{"get_begidx", (PyCFunction)get_begidx, METH_NOARGS, doc_get_begidx},
{"get_endidx", (PyCFunction)get_endidx, METH_NOARGS, doc_get_endidx},