Guido van Rossum
359bcaa539
This fix (across 4 files in 3 directories) solves a subtle problem with
...
signal handlers in a fork()ed child process when Python is compiled with
thread support. The bug was reported by Scott <scott@chronis.icgroup.com>.
What happens is that after a fork(), the variables used by the signal
module to determine whether this is the main thread or not are bogus,
and it decides that no thread is the main thread, so no signals will
be delivered.
The solution is the addition of PyOS_AfterFork(), which fixes the signal
module's variables. A dummy version of the function is present in the
intrcheck.c source file which is linked when the signal module is not
used.
1997-11-14 22:24:28 +00:00
Guido van Rossum
44620646fd
Renamed Py_input_hook to PyOS_InputHook.
...
Also cleaned out some CR's left by the VC++ editor.
1997-08-11 18:57:29 +00:00
Guido van Rossum
717c6f95be
Move GNU readline interface to ../Modules/readline.c.
...
Add Py_input_hook (used by _tkinter and perhaps Gist).
1997-08-05 21:28:12 +00:00
Guido van Rossum
aee094cc60
Added finalization routines.
1997-08-02 03:02:27 +00:00
Guido van Rossum
ff0ec52d3c
Finally plug the memory leak caused by syntax error (including
...
interactive EOF, which leaked *one* byte).
1997-07-27 01:52:50 +00:00
Guido van Rossum
f6ca6aa869
New build procedure.
1997-07-19 19:39:57 +00:00
Guido van Rossum
ee2373b930
Oops, missed some renamings.
1997-05-07 23:51:07 +00:00
Guido van Rossum
86bea46b3d
Another directory quickly renamed.
1997-04-29 21:03:06 +00:00
Guido van Rossum
5026cb4dc6
Now that the string-sig has settled on r"obin" strings, restrict the
...
<letter><string> notation to 'r' and 'R'.
1997-04-25 17:32:00 +00:00
Guido van Rossum
2d45be1366
(Jack:) On the Mac, give syntax error on \r.
1997-04-11 19:16:25 +00:00
Guido van Rossum
fa658ce03d
Remove two unised variables.
1997-04-09 18:19:39 +00:00
Guido van Rossum
24dacb38c5
Support for alternative string quotes (a"xx", b"xx", c"xx", ...).
1997-04-06 03:46:20 +00:00
Guido van Rossum
6dacd90a83
Allow leading underscore in keywords.
1997-04-02 05:23:46 +00:00
Guido van Rossum
fbd64c8790
Restructured quite a bit, hopefully Lee Busby will find this useful.
...
Also grandly renamed.
Here's the new interface:
When WITH_READLINE is defined, two functions are defined:
- PyOS_GnuReadline (what used to be my_readline() with WITH_READLINE)
- PyOS_ReadlineInit (for Dave Ascher)
Always, these functions are defined:
- PyOS_StdioReadline (what used to be my_readline() without WITH_READLINE)
- PyOS_Readline (the interface used by tokenizer.c and [raw_]input().
There's a global function pointer PyOS_ReadlineFunctionPointer,
initialized to NULL. When PyOS_Readline finds this to be NULL, it
sets it to either PyOS_GnuReadline or PyOS_StdioReadline depending on
which one makes more sense (i.e. it uses GNU only if it is defined
*and* stdin is indeed a tty device).
An embedding program that has its own wishes can set the function
pointer to a function of its own design. It should take a char*
prompt argument (which may be NULL) and return a string *ending in a
\n character* -- or "" for EOF or NULL for a user interrupt.
--Guido van Rossum (home page: http://www.python.org/~guido/ )
1997-02-18 21:53:32 +00:00
Guido van Rossum
bae95189b0
Added decl for Py_AddPendingCall and include mymalloc.h, all to keep
...
lint happy.
1997-02-14 21:12:24 +00:00
Guido van Rossum
ad74fa6674
In the Unix version, arrange for sigcheck() to be called via
...
Py_AddPendingCall(). This avoids having to call sigcheck() in the
ticker code in ceval.c's main interpreter loop.
1997-01-21 06:00:33 +00:00
Guido van Rossum
408027ea46
Rename DEBUG macro to Py_DEBUG
1996-12-30 16:17:54 +00:00
Guido van Rossum
fd8a393086
Make gcc -Wall happy
1996-12-02 18:27:33 +00:00
Guido van Rossum
d266eb460e
New permission notice, includes CNRI.
1996-10-25 14:44:06 +00:00
Guido van Rossum
0bc253dba7
Explicitly call rl_initialize().
...
Set rl_readline_name to python.
Move extern decls to more logical point.
1996-09-13 04:09:26 +00:00
Guido van Rossum
7cf1fcf347
Always include config.h
1996-08-19 22:12:39 +00:00
Guido van Rossum
9ea917ebaa
Only define PyOS_ReadlineInit if WITH_READLINE defined.
1996-05-24 20:44:12 +00:00
Guido van Rossum
adf876938a
Separate readline initialization into new function PyOS_ReadlineInit().
...
For Dave Ascher's readline extensions.
1996-04-09 02:45:31 +00:00
Guido van Rossum
faa436c70b
use only j for imaginary constants
1996-01-26 18:59:07 +00:00
Guido van Rossum
f595fde47b
changes for pow(**) and complex
1996-01-12 01:31:58 +00:00
Guido van Rossum
c7fea2feed
add sigrelse() call for SunOS 4.1; add some fflush() calls
1996-01-12 01:30:55 +00:00
Guido van Rossum
3f6bb86593
fix bogus resize length in nextc
1995-09-21 20:36:34 +00:00
Guido van Rossum
94d32b18e0
ignore control-l in whitespace
1995-07-07 22:27:27 +00:00
Guido van Rossum
2e96eb9266
replace "\r\n" with "\n" at line end (Jim Ahlstrom)
1995-06-14 18:26:02 +00:00
Guido van Rossum
575d561c65
added PyErr_SetInterrupt()
1995-03-10 15:13:03 +00:00
Guido van Rossum
d09b41bf05
remove last bits of mac specific code
1995-01-30 12:55:22 +00:00
Jack Jansen
9fc3989c66
Mac interrupt code moved to macglue.c
1995-01-27 14:40:41 +00:00
Jack Jansen
51f4b8dc78
New cmd-. handling for the mac.
1995-01-26 16:20:38 +00:00
Guido van Rossum
ec4982761b
fix strncpy call (uninitialized memory read)
1995-01-20 16:59:12 +00:00
Guido van Rossum
badadd2165
typo
1995-01-20 16:58:43 +00:00
Jack Jansen
febf811a2d
Added mac-only intrpeek routine that peeks for command-.
1995-01-19 12:12:36 +00:00
Guido van Rossum
78c0535a22
fix loop on unterminated triple quotes
1995-01-17 16:12:13 +00:00
Guido van Rossum
62e376b164
made interrupted static again
1995-01-17 16:11:53 +00:00
Guido van Rossum
087579ea51
added $& to $(LIB) target for Sequent
1995-01-17 16:11:29 +00:00
Guido van Rossum
b9f8d6e54d
Added 1995 to copyright message.
1995-01-04 19:08:09 +00:00
Guido van Rossum
5799b52008
Added 1995 copyright.
...
object.h: made sizes and refcnts signed ints.
stringobject.h: make getstrsize() signed int.
methodobject.h: add METH_VARARGS and METH_FREENAME flag bit definitions.
1995-01-04 19:06:22 +00:00
Guido van Rossum
588633daa2
Parser/tokenizer.c (tok_nextc): zap tok->buf after freeing;
...
rest: abort() -> fatal(); small things
1994-12-30 15:46:02 +00:00
Guido van Rossum
2929527aed
* Parser/intrcheck.c: make 'interrupted' global (forgot for
...
whom...)
1994-09-28 15:46:03 +00:00
Guido van Rossum
1a817c0911
* Parser/tokenizer.c (tok_nextc): count line numbers when parsing
...
strings
1994-09-19 08:06:25 +00:00
Guido van Rossum
6522eb0400
* Parser/grammar1.c (finddfa): massive speed up by using direct
...
addressing instead of searching
1994-09-09 11:11:39 +00:00
Guido van Rossum
1d5735e846
Merge back to main trunk
1994-08-30 08:27:36 +00:00
Guido van Rossum
f4b1a64a21
* Parser/tokenizer.c: backup over illegal newline in string
...
literal (for "completeness" test)
1994-08-29 12:43:07 +00:00
Guido van Rossum
bd0389d5fd
don't call strncpy(str, NULL, 0)
1994-08-29 12:25:45 +00:00
Guido van Rossum
0e3da7ba50
Makefile: add $(OPT) to linking line
...
tokenizer.c: move tok_backup call around
1994-08-29 10:44:10 +00:00
Guido van Rossum
d250ee2413
* Parser/tokenizer.c: backup over illegal newline in string
...
literal (for "completeness" test)
* */Makefile*.in: remove lib*.a before adding to it
1994-08-23 13:38:57 +00:00