Thomas Heller
1b04664eab
Change those parts of the Python-api that were functions in 2.4, and
...
are now macros to exported functions again.
Fixes [ 1465834 ] bdist_wininst preinstall script support is broken in 2.5a1.
2006-04-18 18:51:06 +00:00
Jeremy Hylton
a4ebc135ac
Refactor: Move code that uses co_lnotab from ceval to codeobject
2006-04-18 14:47:00 +00:00
Martin v. Löwis
45294a9562
Remove types from type_list if they have no objects
...
and unlist_types_without_objects is set.
Give dump_counts a FILE* argument.
2006-04-18 06:24:08 +00:00
Skip Montanaro
b507972cdd
C++ compiler cleanup: cast...
2006-04-18 00:57:15 +00:00
Skip Montanaro
53a6d1de83
C++ compiler cleanup: extern "C" a couple declarations, cast int to size_t
2006-04-18 00:55:46 +00:00
Skip Montanaro
7ff54e7706
C++ compiler cleanup: migrate to modsupport.h
2006-04-18 00:53:48 +00:00
Ronald Oussoren
6c1074888e
This patches fixes a number of byteorder problems in MacOSX specific code.
2006-04-17 13:40:08 +00:00
Neal Norwitz
1a26920506
moduleName can be NULL
2006-04-17 00:33:23 +00:00
Thomas Wouters
b8f81d4863
Add missing DECREF to PyErr_WriteUnraisable(). That function reports
...
exceptions that can't be raised any further, because (for instance) they
occur in __del__ methods. The coroutine tests in test_generators was
triggering this leak. Remove the leakers' testcase, and add a simpler
testcase that explicitly tests this leak to test_generators.
test_generators now no longer leaks at all, on my machine. This fix may also
solve other leaks, but my full refleakhunting run is still busy, so who
knows?
2006-04-15 23:27:28 +00:00
Thomas Wouters
c6e55068ca
Use Py_VISIT in all tp_traverse methods, instead of traversing manually or
...
using a custom, nearly-identical macro. This probably changes how some of
these functions are compiled, which may result in fractionally slower (or
faster) execution. Considering the nature of traversal, visiting much of the
address space in unpredictable patterns, I'd argue the code readability and
maintainability is well worth it ;P
2006-04-15 21:47:09 +00:00
Martin v. Löwis
ab0e284a24
Zap ZAP.
2006-04-15 18:14:21 +00:00
Thomas Wouters
edf17d8798
Use Py_CLEAR instead of in-place DECREF/XDECREF or custom macros, for
...
tp_clear methods.
2006-04-15 17:28:34 +00:00
Martin v. Löwis
841747cb56
Fix sys.getobjects(0): we get a reference to the
...
arena's "private" list of objects, so there might
be two references to that list.
2006-04-15 12:46:09 +00:00
Martin v. Löwis
5cb6936672
Make Py_BuildValue, PyObject_CallFunction and
...
PyObject_CallMethod aware of PY_SSIZE_T_CLEAN.
2006-04-14 09:08:42 +00:00
Neal Norwitz
615461603c
SF Bug #1454485 , array.array('u') could crash the interpreter when
...
passing a string. Martin already fixed the actual crash by ensuring
Py_UNICODE is unsigned. As discussed on python-dev, this fix
removes the possibility of creating a unicode string from a raw buffer.
There is an outstanding question of how to fix the crash in 2.4.
2006-04-14 05:20:28 +00:00
Neal Norwitz
8c0dc84398
ALIGNMENT_SHIFT is not used
2006-04-14 03:53:34 +00:00
Martin v. Löwis
da69041123
Force 8-alignment of memory blocks, as needed on
...
64-bit machines that require pointers to be aligned (e.g. IA64)
2006-04-13 19:16:13 +00:00
Martin v. Löwis
f33dea2961
Fix type errors.
2006-04-13 13:08:58 +00:00
Martin v. Löwis
0cc56e5c59
Introduce asdl_int_seq, to hold cmpop_ty.
2006-04-13 12:29:43 +00:00
Skip Montanaro
869bacd465
revert - breaks build of Python/ast.c w/ gcc
2006-04-13 09:48:28 +00:00
Skip Montanaro
b940671186
Use union to discriminate pointer types from enum/int types.
2006-04-13 09:37:01 +00:00
Georg Brandl
7f573f7319
Add a test for Py_ssize_t. Correct typo in getargs.c.
2006-04-13 07:59:30 +00:00
Martin v. Löwis
b1ed7fac12
Replace INT_MAX with PY_SSIZE_T_MAX.
2006-04-13 07:52:27 +00:00
Anthony Baxter
ac6bd46d5c
spread the extern "C" { } magic pixie dust around. Python itself builds now
...
using a C++ compiler. Still lots and lots of errors in the modules built by
setup.py, and a bunch of warnings from g++ in the core.
2006-04-13 02:06:09 +00:00
Anthony Baxter
d691f1a35f
casting nastiness to make C++ compiler happy
2006-04-13 01:23:28 +00:00