Commit Graph

1983 Commits

Author SHA1 Message Date
Michael W. Hudson
c849e63eb0 This is Pete Shinners' patch from his bug report
[ 984722 ] Py_BuildValue loses reference counts on error

I'm ever-so-slightly uneasy at the amount of work this can do with an
exception pending, but I don't think that this can result in anything
more serious than a strange error message.
2004-07-14 11:28:06 +00:00
Brett Cannon
711e7d97e4 Add PyArg_VaParseTupleAndKeywords(). Document this function and
PyArg_VaParse().

Closes patch #550732.  Thanks Greg Chapman.
2004-07-10 22:20:32 +00:00
Neal Norwitz
739a8f86d6 Fix a couple of signed/unsigned comparison warnings 2004-07-08 01:55:58 +00:00
Neal Norwitz
93468eac72 Remove unused macros in .c files 2004-07-08 01:49:00 +00:00
Michael W. Hudson
30ea2f223f This closes patch:
[ 960406 ] unblock signals in threads

although the changes do not correspond exactly to any patch attached to
that report.

Non-main threads no longer have all signals masked.

A different interface to readline is used.

The handling of signals inside calls to PyOS_Readline is now rather
different.

These changes are all a bit scary!  Review and cross-platform testing
much appreciated.
2004-07-07 17:44:12 +00:00
Raymond Hettinger
513ffe8112 * Fix missing return after error message is set.
* Add a test case that would have caught it.
2004-07-06 13:44:41 +00:00
Thomas Heller
1df04617b7 When importing an extension on Windows, the code reads the PE 'import
table' of the dll, to make sure that the dll really was build for the
correct Python version.  It does this by looking for an entry
'pythonXY.dll' (X.Y is the Python version number).

The code now checks the size of the dll's import table before reading
entries from it.  Before this patch, the code crashed trying to read
the import table when the size was zero (as in Win2k's wmi.dll, for
example).

Look for imports of 'pythonXY_d.dll' in a debug build instead of
'pythonXY.dll'.

Fixes SF 951851: Crash when reading "import table" of certain windows dlls.

Already backported to the 2.3 branch.
2004-07-02 08:53:57 +00:00
Raymond Hettinger
214b1c3aae SF Bug #215126: Over restricted type checking on eval() function
The builtin eval() function now accepts any mapping for the locals argument.
Time sensitive steps guarded by PyDict_CheckExact() to keep from slowing
down the normal case.  My timings so no measurable impact.
2004-07-02 06:41:07 +00:00
Martin v. Löwis
ef82d2fdfe Patch #923098: Share interned strings in marshal. 2004-06-27 16:51:46 +00:00
Martin v. Löwis
8d97e33bb7 Patch #966493: Cleanup generator/eval_frame exposure. 2004-06-27 15:43:12 +00:00
Raymond Hettinger
a7f56bc0cc Get ceval.c to compile again by moving declarations before other statments. 2004-06-26 04:34:33 +00:00
Nicholas Bastin
d858a7763a Massive performance improvement for C extension and builtin tracing code 2004-06-25 23:31:06 +00:00
Raymond Hettinger
43ea47ff06 Move NOP to end of code transformation. 2004-06-24 09:25:39 +00:00
Nicholas Bastin
941b8bc41a Less ugly #ifdefs for C profiling fix 2004-06-22 15:37:51 +00:00
Nicholas Bastin
bbffbd1983 One forgotten C profiling #ifdef 2004-06-22 04:18:47 +00:00
Nicholas Bastin
4c70b69fb1 Making C profiling a configure option (at least temporarily) 2004-06-22 03:51:38 +00:00
Raymond Hettinger
9c18e81fb2 Install two code generation optimizations that depend on NOP.
Reduces the cost of "not" to almost zero.
2004-06-21 16:31:15 +00:00
Armin Rigo
8817fcdba5 Performance tweak: allow stack_pointer and oparg to be register variables.
SF patch #943898
2004-06-17 10:22:40 +00:00
Neal Norwitz
0f5aed4e41 Remove compiler warning 2004-06-13 20:32:17 +00:00
Neal Norwitz
d85c452604 Make private function static 2004-06-13 20:31:49 +00:00
Martin v. Löwis
737ea82a5a Patch #774665: Make Python LC_NUMERIC agnostic. 2004-06-08 18:52:54 +00:00
Martin v. Löwis
f30d60edbc Patch #510695: Add TSC profiling for the VM. 2004-06-08 08:17:44 +00:00
Thomas Heller
25653242fe Fix a refcount bug in an obscure code corner.
Already backported.
2004-06-07 15:04:10 +00:00
Raymond Hettinger
f2c0830585 SF bug #963956: Bad error mesage when subclassing a module
Add a more informative message for the common user mistake of subclassing
from a module name rather than another class (i.e. random instead of
random.random).
2004-06-05 06:16:22 +00:00
Martin v. Löwis
e440e47e91 Patch #957398: Add public API for Generator Object/Type. 2004-06-01 15:22:42 +00:00