| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
PyOS_InputHook and PyOS_ReadlineFunctionPointer).
The inaccuracies were causing problems in framework builds on Mac OS X.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
[ 676342 ] after using pdb readline does not work correctly
which is required to fix that bug. So maaybe a bugfix candidate.
|
|
|
|
| |
state swaps in readline).
|
| |
|
|
|
|
|
|
|
|
| |
- Whitespace normalization.
- Cleaned up some comments.
- Broke long lines.
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
for Py_Main().
Thanks to Kalle Svensson and Skip Montanaro for the patches.
|
| |
|
|
|
|
| |
also call using_history() to properly initialize history variables
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.]
|
| |
|
| |
|
| |
|
|
|
|
| |
Clarify the docstring for get_history_length. Closes SF patch 494066.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modules/
_hotshot.c
dbmmodule.c
fcntlmodule.c
main.c
pwdmodule.c
readline.c
selectmodule.c
signalmodule.c
termios.c
timemodule.c
unicodedata.c
|
|
|
|
| |
[ #513235 ] prevent readline filename completion
|
| |
|
|
|
|
|
| |
Also changed <>-style #includes to ""-style in some places where the
former didn't make sense.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Thanks to Nathaniel Gray for reporting the confusion.
|
|
|
|
|
|
|
| |
This patch allows the readline module to build cleanly with GNU
readline 4.2 without breaking the build for earlier GNU readline
versions. The configure script checks for the presence of
rl_completion_matches in libreadline.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
always:
- #undef HAVE_CONFIG_H (because otherwise chardefs.h tries to include
strings.h)
- #include readline.h and history.h
and we never declare any readline function prototypes ourselves.
This makes it compile with readline 4.2, albeit with a few warnings.
Some of the remaining warnings are about completion_matches(), which
is renamed to rl_completion_matches().
I've tested it with various other versions, from 2.0 up, and they all
seem to work (some with warnings) -- but only on Red Hat Linux 6.2.
Fixing the warnings for readline 4.2 would break compatibility with
3.0 (and maybe even earlier versions), and readline doesn't seem to
have a way to test for its version at compile time, so I'd rather
leave the warnings in than break compilation with older versions.
|
|
|
|
| |
under CYGWIN as shared libraries (DLLs).
|
|
|
|
|
|
|
| |
readline doesn't have it before readline 2.2 and there's no
compile-time way to find out which readline version is in use.
Sigh. GNU readline sucks.
|
| |
|
|
|
|
|
|
|
| |
This fixes the first half of bug #110611: the immediate exit when ^C
is hit when readline and threads are configured.
Also added a new module variable, readline.library_version.
|
| |
|
|
|
|
|
|
| |
Remove some of GCC's warning in -Wstrict-prototypes mode.
This closes SourceForge patch #101342.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
handlers "return void", according to ANSI C.
Removed the new Py_RETURN_FROM_SIGNAL_HANDLER macro.
Left RETSIGTYPE in the config stuff, because it's not clear to
me that others aren't relying on it (e.g., extension modules).
|
|
|
|
|
| |
return something if RETSIGTYPE is not void, in functions that are defined as
returning RETSIGTYPE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and a couple of functions that were missed in the previous batches. Not
terribly tested, but very carefully scrutinized, three times.
All these were found by the little findkrc.py that I posted to python-dev,
which means there might be more lurking. Cases such as this:
long
func(a, b)
long a;
long b; /* flagword */
{
and other cases where the last ; in the argument list isn't followed by a
newline and an opening curly bracket. Regexps to catch all are welcome, of
course ;)
|
| |
|
| |
|
| |
|
|
|
|
| |
XXX should perhaps support history truncation as well
|
| |
|
|
|
|
|
|
|
|
|
|
| |
For more comments, read the patches@python.org archives.
For documentation read the comments in mymalloc.h and objimpl.h.
(This is not exactly what Vladimir posted to the patches list; I've
made a few changes, and Vladimir sent me a fix in private email for a
problem that only occurs in debug mode. I'm also holding back on his
change to main.c, which seems unnecessary to me.)
|
|
|
|
| |
PyArg_ParseTuple() format string arguments as possible.
|