Gregory P. Smith
dd96db63f6
This reverts r63675 based on the discussion in this thread:
...
http://mail.python.org/pipermail/python-dev/2008-June/079988.html
Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names
in the spirit of 3.0 are available via a #define only. See the email thread.
2008-06-09 04:58:54 +00:00
Christian Heimes
593daf545b
Renamed PyString to PyBytes
2008-05-26 12:51:38 +00:00
Benjamin Peterson
f19a7b90bd
A little reformating of Py3k warnings
2008-04-27 18:40:21 +00:00
Benjamin Peterson
9f4f48114f
Use PyErr_WarnPy3k throughout
2008-04-27 03:01:45 +00:00
Georg Brandl
d65ab950c1
Fix tabs.
2008-03-25 08:31:32 +00:00
Georg Brandl
d5b635f196
Make Py3k warnings consistent w.r.t. punctuation; also respect the
...
EOL 80 limit and supply more alternatives in warning messages.
2008-03-25 08:29:14 +00:00
Steven Bethard
b865f05a0f
cell_compare needs to return -2 instead of NULL.
2008-03-18 19:03:50 +00:00
Steven Bethard
ae42f33cdf
Add py3k warnings for object, type, cell and dict comparisons. This should resolve issue2342 and partly resolve issue2373.
2008-03-18 17:26:10 +00:00
Amaury Forgeot d'Arc
632fad3933
Prevent a crash with nested scopes, again caused by calling Py_DECREF when the pointer
...
is still present in the containing structure.
2008-02-16 20:55:24 +00:00
Amaury Forgeot d'Arc
ce7d10ccc4
Issue #1445 : Fix a SystemError when accessing the ``cell_contents``
...
attribute of an empty cell object. Now a ValueError is raised.
2007-11-24 13:44:17 +00:00
Martin v. Löwis
6819210b9e
PEP 3123: Provide forward compatibility with Python 3.0, while keeping
...
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
PyVarObject_HEAD_INIT.
2007-07-21 06:55:02 +00:00
Neal Norwitz
0f415dc57f
Another problem reported by Coverity. Backport candidate.
2006-06-30 07:32:46 +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
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
Georg Brandl
abd1ff8f1f
Previously, Python code had no easy way to access the contents of a
...
cell object. Now, a ``cell_contents`` attribute has been added
(closes patch #1170323 ).
2006-03-18 07:59:59 +00:00
Neil Schemenauer
e83c00efd0
Use new GC API.
2001-08-29 23:54:21 +00:00
Barry Warsaw
7ce3694a52
repr's converted to using PyString_FromFormat() instead of sprintf'ing
...
into a hardcoded char* buffer.
Closes patch #454743 .
2001-08-24 18:34:26 +00:00
Tim Peters
6d6c1a35e0
Merge of descr-branch back into trunk.
2001-08-02 04:15:00 +00:00
Jeremy Hylton
30c9f3991c
Variety of small INC/DECREF patches that fix reported memory leaks
...
with free variables. Thanks to Martin v. Loewis for finding two of
the problems. This fixes SF buf 405583.
There is also a C API change: PyFrame_New() is reverting to its
pre-2.1 signature. The change introduced by nested scopes was a
mistake. XXX Is this okay between beta releases?
cell_clear(), the GC helper, must decref its reference to break
cycles.
frame_dealloc() must dealloc all cell vars and free vars in addition
to locals.
eval_code2() setup code must INCREF cells it copies out of the
closure.
The STORE_DEREF opcode implementation must DECREF the object it passes
to PyCell_Set().
2001-03-13 01:58:22 +00:00
Jeremy Hylton
fbd849f201
PEP 227 implementation
...
A cell contains a reference to a single PyObject. It could be
implemented as a mutable, one-element sequence, but the separate type
has less overhead.
2001-01-25 20:04:14 +00:00