Neal Norwitz
c0cde4da2a
Fix memory leak under some conditions.
...
Reported by Klocwork, #98 .
2006-07-16 02:17:36 +00:00
Neal Norwitz
84be93b2db
Bug #1512814 , Fix incorrect lineno's when code within a function
...
had more than 255 blank lines. Byte codes need to go first, line #s second.
2006-07-16 01:50:38 +00:00
Georg Brandl
9dceedbb97
Accept long options "--help" and "--version".
2006-07-12 15:31:17 +00:00
Neal Norwitz
a1f1090109
Actually change the MAGIC #. Create a new section for 2.5c1 and mention the impact of changing the MAGIC #.
2006-07-12 07:28:29 +00:00
Neal Norwitz
edef2be4af
Bug #1520864 : unpacking singleton tuples in for loop (for x, in) work again.
2006-07-12 05:26:17 +00:00
Thomas Heller
249f6b1bf4
Add missing Py_DECREFs.
2006-07-11 16:44:25 +00:00
Tim Peters
32a8361f2d
After approval from Anthony, merge the tim-current_frames
...
branch into the trunk. This adds a new sys._current_frames()
function, which returns a dict mapping thread id to topmost
thread stack frame.
2006-07-10 21:08:24 +00:00
Neal Norwitz
ed65755608
Bug #1512814 , Fix incorrect lineno's when code at module scope
...
started after line 256.
2006-07-10 00:04:44 +00:00
Neal Norwitz
28746aba9b
On 64 bit systems, int literals that use less than 64 bits are now ints
...
rather than longs. This also fixes the test for eval(-sys.maxint - 1).
2006-07-09 22:14:42 +00:00
Neil Schemenauer
6ec6ab02c3
Fix SF bug 1441486: bad unary minus folding in compiler.
2006-07-09 21:19:29 +00:00
Neil Schemenauer
0e07b60a4e
Fix AST compiler bug #1501934 : incorrect LOAD/STORE_GLOBAL generation.
2006-07-09 16:16:34 +00:00
Neal Norwitz
fb48afa708
Fix SF bug #1519018 : 'as' is now validated properly in import statements
2006-07-08 05:31:37 +00:00
Neal Norwitz
a4df11d9c3
Fix refleaks reported by Shane Hathaway in SF patch #1515361 . This change
...
contains only the changes related to leaking the copy variable.
2006-07-06 04:28:59 +00:00
Martin v. Löwis
fcfff0a7fa
Bug #1417699 : Reject locale-specific decimal point in float()
...
and atof().
2006-07-03 12:19:50 +00:00
Hye-Shik Chang
e6a1cb9700
Bug #1511381 : codec_getstreamcodec() in codec.c is corrected to
...
omit a default "error" argument for NULL pointer. This allows
the parser to take a codec from cjkcodecs again.
(Reported by Taewook Kang and reviewed by Walter Doerwald)
2006-06-23 21:16:18 +00:00
Andrew MacIntyre
9291332de1
Patch #1454481 : Make thread stack size runtime tunable.
...
Heavily revised, comprising revisions:
46640 - original trunk revision (backed out in r46655)
46647 - markup fix (backed out in r46655)
46692:46918 merged from branch aimacintyre-sf1454481
branch tested on buildbots (Windows buildbots had problems
not related to these changes).
2006-06-13 15:04:24 +00:00
Neal Norwitz
245ce8db46
i and j are initialized below when used. No need to do it twice
2006-06-12 02:16:10 +00:00
Neal Norwitz
b9845e72f9
Get rid of f_restricted too. Doc the other 4 ints that were already removed
...
at the NeedForSpeed sprint.
2006-06-12 02:11:18 +00:00
Neal Norwitz
2585ad58e6
Fix indentation of case and a Py_ssize_t issue.
2006-06-12 02:09:34 +00:00
Martin v. Löwis
0e8bd7e1cc
Patch #1495999 : Part two of Windows CE changes.
...
- update header checks, using autoconf
- provide dummies for getenv, environ, and GetVersion
- adjust MSC_VER check in socketmodule.c
2006-06-10 12:23:46 +00:00
Georg Brandl
98251f8a2f
Argh. "integer" is a very confusing word ;)
...
Actually, checking for INT_MAX and INT_MIN is correct since
the format code explicitly handles a C "int".
2006-06-08 13:31:07 +00:00
Georg Brandl
22ccbbc4ec
Bug #1502750 : Fix getargs "i" format to use LONG_MIN and LONG_MAX for bounds checking.
2006-06-08 12:45:01 +00:00
Tim Peters
02f1d0dc78
_PySys_Init(): It's rarely a good idea to size a buffer to the
...
exact maximum size someone guesses is needed. In this case, if
we're really worried about extreme integers, then "cp%d" can
actually need 14 bytes (2 for "cp" + 1 for \0 at the end +
11 for -(2**31-1)). So reserve 128 bytes instead -- nothing is
actually saved by making a stack-local buffer tiny.
2006-06-06 00:25:07 +00:00
Brett Cannon
4f7a7220c1
Add 3 more bytes to a buffer to cover constants in string and null byte on top of 10 possible digits for an int.
...
Closes bug #1501223 .
2006-06-05 23:51:55 +00:00
Tim Peters
28eeefe566
Revert revisions:
...
46640 Patch #1454481 : Make thread stack size runtime tunable.
46647 Markup fix
The first is causing many buildbots to fail test runs, and there
are multiple causes with seemingly no immediate prospects for
repairing them. See python-dev discussion.
Note that a branch can (and should) be created for resolving these
problems, like
svn copy svn+ssh://svn.python.org/python/trunk -r46640 svn+ssh://svn.python.org/python/branches/NEW_BRANCH
followed by merging rev 46647 to the new branch.
2006-06-04 23:52:47 +00:00
Georg Brandl
ddbaa660d3
Patch #1346214 : correctly optimize away "if 0"-style stmts
...
(thanks to Neal for review)
2006-06-04 21:56:52 +00:00
Andrew MacIntyre
63f0db682e
clean up function declarations to conform to PEP-7 style.
2006-06-04 12:59:59 +00:00
Andrew MacIntyre
6539d2d3c7
Patch #1454481 : Make thread stack size runtime tunable.
2006-06-04 12:31:09 +00:00
Armin Rigo
35f6d36951
[ 1497053 ] Let dicts propagate the exceptions in user __eq__().
...
[ 1456209 ] dictresize() vulnerability ( <- backport candidate ).
2006-06-01 13:19:12 +00:00
Georg Brandl
bf92f46572
Convert more modules to METH_VARARGS.
2006-05-29 21:58:42 +00:00
Georg Brandl
96a8c3954c
Make use of METH_O and METH_NOARGS where possible.
...
Use Py_UnpackTuple instead of PyArg_ParseTuple where possible.
2006-05-29 21:04:52 +00:00
Georg Brandl
80181e2b78
Fix compiler warning.
2006-05-29 14:33:55 +00:00
Georg Brandl
b569ee4863
Handle PyMem_Malloc failure in pystrtod.c. Closes #1494671 .
2006-05-29 14:28:05 +00:00
Georg Brandl
a1121fa935
Fix #1494605 .
2006-05-29 14:13:21 +00:00
Georg Brandl
5f6861df93
Correct None refcount issue in Mac modules. (Are they
...
still used?)
2006-05-28 21:57:35 +00:00
Georg Brandl
0fd1291c38
The empty string is a valid import path.
...
(fixes #1496539 )
2006-05-28 20:11:45 +00:00
Tim Peters
5e9d6cfbda
PyErr_Display(), PyErr_WriteUnraisable(): Coverity found a cut-and-paste
...
bug in both: `className` was referenced before being checked for NULL.
2006-05-28 10:41:29 +00:00
Richard Jones
7b9558d37d
Conversion of exceptions over from faked-up classes to new-style C types.
2006-05-27 12:29:24 +00:00
Fredrik Lundh
7a83089c06
needforspeed: backed out the Py_LOCAL-isation of ceval; the massive in-
...
lining killed performance on certain Intel boxes, and the "aggressive"
macro itself gives most of the benefits on others.
2006-05-27 10:39:48 +00:00
Tim Peters
7df5e7f4b2
Patch 1145039.
...
set_exc_info(), reset_exc_info(): By exploiting the
likely (who knows?) invariant that when an exception's
`type` is NULL, its `value` and `traceback` are also NULL,
save some cycles in heavily-executed code.
This is a "a kronar saved is a kronar earned" patch: the
speedup isn't reliably measurable, but it obviously does
reduce the operation count in the normal (no exception
raised) path through PyEval_EvalFrameEx().
The tim-exc_sanity branch tries to push this harder, but
is still blowing up (at least in part due to pre-existing
subtle bugs that appear to have no other visible
consequences!).
Not a bugfix candidate.
2006-05-26 23:14:37 +00:00
Georg Brandl
7784f12d74
Replace Py_BuildValue("OO") by PyTuple_Pack.
2006-05-26 20:04:44 +00:00
Georg Brandl
f4ef11659c
Need for speed: Patch #921466 : sys.path_importer_cache is now used to cache valid and
...
invalid file paths for the built-in import machinery which leads to
fewer open calls on startup.
Also fix issue with PEP 302 style import hooks which lead to more open()
calls than necessary.
2006-05-26 18:03:31 +00:00
Fredrik Lundh
1b94940165
Py_LOCAL shouldn't be used for data; it works for some .NET 2003 compilers,
...
but Trent's copy thinks that it's an anachronism...
2006-05-26 12:01:49 +00:00
Fredrik Lundh
57640f5c57
needforspeed: added PY_LOCAL_AGGRESSIVE macro to enable "aggressive"
...
LOCAL inlining; also added some missing whitespace
2006-05-26 11:54:04 +00:00
Fredrik Lundh
b8b3c8e276
needforspeed: added Py_LOCAL macro, based on the LOCAL macro used
...
for SRE and others. applied Py_LOCAL to relevant portion of ceval,
which gives a 1-2% speedup on my machine. ymmv.
2006-05-26 11:29:39 +00:00
Brett Cannon
0ed05875b2
Swap out bare malloc()/free() use for PyMem_MALLOC()/PyMem_FREE() .
2006-05-25 20:44:08 +00:00
Georg Brandl
684fd0c8ec
Replace PyObject_CallFunction calls with only object args
...
with PyObject_CallFunctionObjArgs, which is 30% faster.
2006-05-25 19:15:31 +00:00
Tim Peters
da53afa1b0
A new table to help string->integer conversion was added yesterday to
...
both mystrtoul.c and longobject.c. Share the table instead. Also
cut its size by 64 entries (they had been used for an inscrutable
trick originally, but the code no longer tries to use that trick).
2006-05-25 17:34:03 +00:00
Thomas Wouters
143bdfcee6
Update graminit.c for the fix for #1488915 , Multiple dots in relative import
...
statement raise SyntaxError, and add testcase.
2006-05-25 11:26:25 +00:00
Walter Dörwald
c611f17418
Replace tab inside comment with space.
2006-05-25 08:53:28 +00:00