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