python/dist/src/Modules readline.c,2.64,2.65
Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1:/tmp/cvs-serv32387/Modules Modified Files: readline.c Log Message: Patch #800697: Add readline.clear_history. Index: readline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/readline.c,v retrieving revision 2.64 retrieving revision 2.65 diff -C2 -d -r2.64 -r2.65 *** readline.c 17 Jul 2003 16:26:58 -0000 2.64 --- readline.c 20 Sep 2003 16:08:33 -0000 2.65 *************** *** 413,416 **** --- 413,434 ---- + #ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER + + /* Exported function to clear the current history */ + + static PyObject * + py_clear_history(PyObject *self, PyObject *noarg) + { + clear_history(); + Py_INCREF(Py_None); + return Py_None; + } + + PyDoc_STRVAR(doc_clear_history, + "clear_history() -> None\n\ + Clear the current readline history."); + #endif + + /* Exported function to insert text into the line buffer */ *************** *** 484,487 **** --- 502,508 ---- {"set_pre_input_hook", set_pre_input_hook, METH_VARARGS, doc_set_pre_input_hook}, + #endif + #ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER + {"clear_history", py_clear_history, METH_NOARGS, doc_clear_history}, #endif {0, 0}
participants (1)
-
loewis@users.sourceforge.net