diff options
author | Guido van Rossum <guido@python.org> | 1998-10-08 02:10:56 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-10-08 02:10:56 (GMT) |
commit | 36eef3c1739cdec3956e5ad86b5887985d249302 (patch) | |
tree | b80a458d9f15ffd149102a534af166ac1708eb5a /Doc | |
parent | 7e1e57494ce8001a61c1cb420034a9bb0955dd62 (diff) | |
download | cpython-36eef3c1739cdec3956e5ad86b5887985d249302.zip cpython-36eef3c1739cdec3956e5ad86b5887985d249302.tar.gz cpython-36eef3c1739cdec3956e5ad86b5887985d249302.tar.bz2 |
Changes by Greg Stein (code) and GvR (design).
Add a new member to the PyBufferProcs struct, bf_getcharbuffer. For
backward compatibility, this member should only be used (this includes
testing for NULL!) when the flag Py_TPFLAGS_HAVE_GETCHARBUFFER is set
in the type structure, below. Note that if its flag is not set, we
may be looking at an extension module compiled for 1.5.1, which will
have garbage at the bf_getcharbuffer member (because the struct wasn't
as long then). If the flag is one, the pointer may still be NULL.
The function found at this member is used in a similar manner as
bf_getreadbuffer, but it is known to point to 8-bit character data.
(See discussion in getargs.c checked in later.)
As a general feature for extending the type structure and the various
structures that (may) hang off it in a backwards compatible way, we
rename the tp_xxx4 "spare" slot to tp_flags. In 1.5.1 and before,
this slot was always zero. In 1.5.1, it may contain various flags
indicating extra fields that weren't present in 1.5.1. The only flag
defined so far is for the bf_getcharbuffer member of the PyBufferProcs
struct.
Note that the new spares (tp_xxx5 - tp_xxx8), once they become used,
should also be protected by a flag (or flags) in tp_flags.
Diffstat (limited to 'Doc')
0 files changed, 0 insertions, 0 deletions