summaryrefslogtreecommitdiffstats
path: root/Modules/readline.c
Commit message (Collapse)AuthorAgeFilesLines
* Check return result from Py_InitModule*(). This API can fail.Neal Norwitz2006-01-191-0/+2
| | | | Probably should be backported.
* Fix parse errors in readline module when compiling without threads.Georg Brandl2005-09-291-0/+2
|
* In a threads-disabled build, typing Ctrl-C into a raw_input() crashed,Michael W. Hudson2005-04-071-0/+4
| | | | | | | | | because (essentially) I didn't realise that PY_BEGIN/END_ALLOW_THREADS actually expanded to nothing under a no-threads build, so if you somehow NULLed out the threadstate (e.g. by calling PyThread_SaveThread) it would stay NULLed when you return to Python. Argh! Backport candidate.
* Fixes forMichael W. Hudson2005-03-301-26/+23
| | | | | | | | | | | | | | | | | [ 1166660 ] The readline module can cause python to segfault It seems to me that the code I'm rewriting here attempted to call any user-supplied hook functions using the thread state of the thread that called the hook-setting function, as opposed to that of the thread that is currently executing. This doesn't work, in general. Fix this by using the PyGILState API (It wouldn't be that hard to define a dummy version of said API when #ifndef WITH_THREAD, would it?). Also, check the conversion to integer of the return value of a hook function for errors (this problem was mentioned in the ipython bug report linked to in the above bug).
* Be a bit more accurate.Michael W. Hudson2005-03-301-1/+2
|
* I don't think it's particularly accurate to say Guido is maintainingMichael W. Hudson2005-03-301-3/+0
| | | | this module any more.
* Patch #1093585: raise a ValueError for negative history items inMartin v. Löwis2005-02-271-0/+10
| | | | remove_history and replace_history. Will backport to 2.4.
* Rename a static variable "history_length" to "_history_length".Hye-Shik Chang2004-11-251-6/+6
| | | | | GNU readline exports a global variable that has such a name already and the collision makes gcc4 doesn't compile the source.
* This is Michiel de Hoon's patch, as attached to the bug report:Michael W. Hudson2004-10-071-7/+13
| | | | | | [ 1030629 ] PyOS_InputHook broken with a couple of utterly inconsequential changes by me.
* SF #1015517, get readline to compile with older compilersNeal Norwitz2004-08-251-3/+4
|
* Fail fatally if strdup fails.Martin v. Löwis2004-08-201-0/+4
|
* Patch #914291: Restore locale while readline is running.Martin v. Löwis2004-08-181-0/+8
|
* fix a couple problems with the last patch picked up by Michael HudsonSkip Montanaro2004-08-161-12/+8
|
* Add get_history_item and replace_history_item functions to the readlineSkip Montanaro2004-08-151-0/+67
| | | | | module. Closes patch #675551. My apologies to Michal Vitecek for taking so long to process this.
* PyThreadState_Swap(NULL) didn't do what I thought it did. FixesMichael W. Hudson2004-07-081-1/+1
| | | | [ 987287 ] Python 2.4a1, interpreter hanging on Keyboard Interrupt
* This closes patch:Michael W. Hudson2004-07-071-8/+89
| | | | | | | | | | | | | | | | | [ 960406 ] unblock signals in threads although the changes do not correspond exactly to any patch attached to that report. Non-main threads no longer have all signals masked. A different interface to readline is used. The handling of signals inside calls to PyOS_Readline is now rather different. These changes are all a bit scary! Review and cross-platform testing much appreciated.
* stupid, stupid, stupid... raw_input() already supports readline() if theSkip Montanaro2004-05-241-23/+0
| | | | readline module is loaded.
* Exposed readline() function from the readline module.Skip Montanaro2004-05-231-0/+23
|
* A few more PyThreadState_Get to PyThreadState_GET conversionsNicholas Bastin2004-03-251-1/+1
|
* remove support for missing ANSI C header files (limits.h, stddef.h, etc).Skip Montanaro2004-02-101-1/+1
|
* Patch #804543: strdup saved locales. Backported to 2.3.Martin v. Löwis2003-11-131-1/+2
|
* Patch #800697: Add readline.clear_history.Martin v. Löwis2003-09-201-0/+21
|
* Remove inaccurate (and it turns out, entirely superfluous) declarations ofMichael W. Hudson2003-07-171-4/+0
| | | | | | PyOS_InputHook and PyOS_ReadlineFunctionPointer). The inaccuracies were causing problems in framework builds on Mac OS X.
* Use appropriate macros not the deprecated DL_IMPORT/DL_EXPORT macrosNeal Norwitz2003-07-011-2/+2
|
* get_completer() takes no argsNeal Norwitz2003-03-011-1/+1
|
* flex_complete looks like a private (but callback) function, so make it staticNeal Norwitz2003-02-211-1/+1
|
* I was in this module anyway, so I did some janitorial things.Michael W. Hudson2003-01-301-17/+14
| | | | | | | | METH_NOARGS functions are still called with two arguments, one NULL, so put that back into the function definitions (I didn't know this until recently). Make get_history_length() METH_NOARGS.
* Add the get_completer() function based on Michael Stone's patch inMichael W. Hudson2003-01-301-0/+17
| | | | | | [ 676342 ] after using pdb readline does not work correctly which is required to fix that bug. So maaybe a bugfix candidate.
* Fix from Michael Stone for SF bug #660476 and #513033 (bogus threadGuido van Rossum2003-01-071-13/+7
| | | | state swaps in readline).
* A few more whitespace normalizations.Guido van Rossum2003-01-071-1/+4
|
* Various cleanups:Guido van Rossum2003-01-071-45/+80
| | | | | | | | - Whitespace normalization. - Cleaned up some comments. - Broke long lines.
* Patch 659834 by Magnus Lie Hetland:Guido van Rossum2002-12-301-0/+4
| | | | | | | | | Check for readline 2.2 features. This should make it possible to compile readline.c again with GNU readline versions 2.0 or 2.1; this ability was removed in readline.c rev. 2.49. Apparently the older versions are still in widespread deployment on older Solaris installations. With an older readline, completion behavior is subtly different (a space is always added).
* Patch #512981: Update readline input stream on sys.stdin/out change.Martin v. Löwis2002-10-261-7/+13
|
* GNU readline() mistakenly sets the LC_CTYPE locale.Guido van Rossum2002-10-091-0/+17
| | | | | This is evil. Only the user or the app's main() should do this! We must save and restore the locale around the rl_initialize() call.
* Excise DL_EXPORT/DL_IMPORT from Modules/*. Required adding a prototypeMark Hammond2002-08-021-1/+1
| | | | | | for Py_Main(). Thanks to Kalle Svensson and Skip Montanaro for the patches.
* Patch #568124: Add doc string macros.Martin v. Löwis2002-06-131-73/+59
|
* patch #562492 - prevent duplicate lines in historySkip Montanaro2002-06-111-2/+19
| | | | also call using_history() to properly initialize history variables
* SF #558432: Prevent Annoying ' ' from readline (Holker Krekel).Guido van Rossum2002-05-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | readline in all python versions is configured to append a 'space' character for a successful completion. But for almost all python expressions 'space' is not wanted (see coding conventions PEP 8). For example if you have a function 'longfunction' and you type 'longf<TAB>' you get 'longfunction ' as a completion. note the unwanted space at the end. The patch fixes this behaviour by setting readline's append_character to '\0' which means don't append anything. This doesn't work with readline < 2.1 (AFAIK nowadays readline2.2 is in good use). An alternative approach would be to make the append_character accessable from python so that modules like the rlcompleter.py can set it to '\0'. [Ed.: I think expecting readline >= 2.2 is fine. If a completer wants another character they can append that to the keyword in the list.]
* #544265, Remove warnings for passing const to free()Neal Norwitz2002-04-211-1/+1
|
* Get rid of warnings due to changing to METH_NOARGSNeal Norwitz2002-03-311-5/+5
|
* Remove many uses of PyArg_NoArgs macro, change METH_OLDARGS to METH_NOARGS.Neal Norwitz2002-03-251-23/+10
|
* Add get_history_item, get_current_history_length, and redisplay functions.Neil Schemenauer2002-03-241-2/+61
| | | | Clarify the docstring for get_history_length. Closes SF patch 494066.
* OS/2 EMX port changes (Modules part of patch #450267):Andrew MacIntyre2002-03-031-0/+4
| | | | | | | | | | | | | | | Modules/ _hotshot.c dbmmodule.c fcntlmodule.c main.c pwdmodule.c readline.c selectmodule.c signalmodule.c termios.c timemodule.c unicodedata.c
* Simon Budig's patch (posted by me):Michael W. Hudson2002-02-131-0/+3
| | | | [ #513235 ] prevent readline filename completion
* Include <unistd.h> in Python.h. Fixes #500924.Martin v. Löwis2002-01-121-4/+0
|
* sprintf -> PyOS_snprintf in some "obviously safe" cases.Tim Peters2001-11-281-2/+4
| | | | | Also changed <>-style #includes to ""-style in some places where the former didn't make sense.
* Fixes for possible buffer overflows in sprintf() usages.Marc-André Lemburg2001-11-281-2/+2
|
* SF patch #443759: Add Interface to readline's add_historyGuido van Rossum2001-10-191-0/+18
| | | | | | | | | | | | | | This was submitted by Moshe, but apparently he's too busy to check it in himself. He wrote: Here is a function in GNU readline called add_history, which is used to manage the history list. Though Python uses this function internally, it does not expose it to the Python programmer. This patch adds direct interface to this function with documentation. This could be used by friendly modules to "seed" the history with commands.
* Patch #462122: add readline startup and pre_event hooks.Martin v. Löwis2001-09-301-24/+127
|
* Cleaned up the docstring for readline.set_completer().Fred Drake2001-08-011-1/+1
| | | | Thanks to Nathaniel Gray for reporting the confusion.