Andrew M. Kuchling
5e27a6cb0b
[Backport r46602 | neal.norwitz]
...
Patch #1357836 :
Prevent an invalid memory read from test_coding in case the done flag is set.
In that case, the loop isn't entered. I wonder if rather than setting
the done flag in the cases before the loop, if they should just exit early.
This code looks like it should be refactored.
Backport candidate (also the early break above if decoding_fgets fails)
2006-10-06 18:59:10 +00:00
Andrew M. Kuchling
100e7d77f2
[Backport rev39767 by nnorwitz]
...
Free coding spec (cs) if there was an error to prevent mem leak.
Maybe backport candidate.
[Bugfix seems applicable to 2.4 to me. --amk]
2006-09-29 17:42:30 +00:00
Neal Norwitz
5f5124e410
Backport 41753:
...
Bug #1378022 , UTF-8 files with a leading BOM crashed the interpreter.
Also bug #1435487 (dup).
2006-02-21 09:19:45 +00:00
Walter Dörwald
a6f561447a
Backport checkin:
...
Apply SF patch #1101726 : Fix buffer overrun in tokenizer.c when a source file
with a PEP 263 encoding declaration results in long decoded line.
2005-07-12 21:58:38 +00:00
Hye-Shik Chang
7df44b384a
SF #941229 : Decode source code with sys.stdin.encoding in interactive
...
modes like non-interactive modes. This allows for non-latin-1 users
to write unicode strings directly and sets Japanese users free from
weird manual escaping <wink> in shift_jis environments.
(Reviewed by Martin v. Loewis)
2004-08-04 17:36:41 +00:00
Anthony Baxter
c2a5a63654
PEP-0318, @decorator-style. In Guido's words:
...
"@ seems the syntax that everybody can hate equally"
Implementation by Mark Russell, from SF #979728 .
2004-08-02 06:10:11 +00:00
Jack Jansen
eddc1449ba
Getting rid of all the code inside #ifdef macintosh too.
2003-11-20 01:44:59 +00:00
Marc-André Lemburg
1fb1400d08
Add URL for PEP to the source code encoding warning.
...
Remove the usage of PyErr_WarnExplicit() since this could cause
sensitive information from the source files to appear in e.g.
log files.
2003-02-17 18:31:57 +00:00
Just van Rossum
f032f86e9e
patch 680474 that fixes bug 679880: compile/eval/exec refused utf-8 bom
...
mark. Added unit test.
2003-02-09 20:38:48 +00:00
Mark Hammond
a2e303c32d
Fix [ 665014 ] files with long lines and an encoding crash.
...
Ensure that the 'size' arg is correctly passed to the encoding reader to
prevent buffer overflows.
2003-01-14 23:15:22 +00:00
Martin v. Löwis
95292d6caa
Constify filenames and scripts. Fixes #651362 .
2002-12-11 14:04:59 +00:00
Neal Norwitz
e08e1bc80a
Fix compiler warning on HP-UX.
...
Cast param to isalnum() to int.
2002-11-02 20:43:25 +00:00
Martin v. Löwis
566f6afe9a
Patch #512981 : Update readline input stream on sys.stdin/out change.
2002-10-26 14:39:10 +00:00
Tim Peters
17db21ffd0
Removed reliance on gcc/C99 extension.
2002-09-03 15:39:58 +00:00
Martin v. Löwis
f62a89b1e0
Ignore encoding declarations inside strings. Fixes #603509 .
2002-09-03 11:52:44 +00:00
Guido van Rossum
84b2bed435
Squash a few calls to the hideously expensive PyObject_CallObject(o,a)
...
-- replace then with slightly faster PyObject_Call(o,a,NULL). (The
difference is that the latter requires a to be a tuple; the former
allows other values and wraps them in a tuple if necessary; it
involves two more levels of C function calls to accomplish all that.)
2002-08-16 17:01:09 +00:00
Skip Montanaro
118ec70ea2
provide less mysterious error messages when seeing end-of-line in
...
single-quoted strings or end-of-file in triple-quoted strings.
closes patch 586561.
2002-08-15 01:20:16 +00:00
Martin v. Löwis
2863c10a86
Use Py_FatalError instead of abort.
2002-08-07 15:18:57 +00:00
Martin v. Löwis
019934b3cc
Fix PEP 263 code --without-unicode. Fixes #591943 .
2002-08-07 12:33:18 +00:00
Jack Jansen
cf0a2cfdb2
Added a cast to shut up a compiler warning.
2002-08-05 14:14:05 +00:00
Martin v. Löwis
725bb233b9
Add 1 to lineno in deprecation warning. Fixes #590888 .
2002-08-05 01:49:16 +00:00
Martin v. Löwis
1ee99d31d9
Make pgen compile with pydebug. Duplicate normalized names, as it may
...
be longer than the old string.
2002-08-04 20:10:29 +00:00
Martin v. Löwis
cd280fb59c
Group statements properly.
2002-08-04 18:28:44 +00:00
Tim Peters
2c3f9c6f04
Repaired a fatal compiler error in the debug build: it's not clear what
...
this was trying to assert, but the name it referenced didn't exist.
2002-08-04 17:58:34 +00:00
Tim Peters
919603b27a
Squash compiler wng about signed-vs-unsigned mismatch.
2002-08-04 17:56:42 +00:00