diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2007-08-19 04:23:20 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2007-08-19 04:23:20 (GMT) |
commit | faa54a392951468090f0095ffa927b16fcb20ca4 (patch) | |
tree | a8586a5cc833217e6b1eaf4d052313475534178a /Include/bytesobject.h | |
parent | 1836358c016cd7f5117f4f34fa3a27c5701e8265 (diff) | |
download | cpython-faa54a392951468090f0095ffa927b16fcb20ca4.zip cpython-faa54a392951468090f0095ffa927b16fcb20ca4.tar.gz cpython-faa54a392951468090f0095ffa927b16fcb20ca4.tar.bz2 |
Code review of the new buffer protocol. Mostly add questions that should
be answered with the comments removed.
There are many places that require checks when doing arithmetic for memory
sizes when allocating memory. Otherwise, overflow is possible with
a subsequent crash.
Fix SF #1777057 which was a result of not initializing the new BufferError
properly. Had to update the test for exceptions for BufferError too.
Diffstat (limited to 'Include/bytesobject.h')
-rw-r--r-- | Include/bytesobject.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Include/bytesobject.h b/Include/bytesobject.h index 12ecf64..729af39 100644 --- a/Include/bytesobject.h +++ b/Include/bytesobject.h @@ -21,6 +21,7 @@ extern "C" { /* Object layout */ typedef struct { PyObject_VAR_HEAD + /* XXX(nnorwitz): should ob_exports be Py_ssize_t? */ int ob_exports; /* how many buffer exports */ Py_ssize_t ob_alloc; /* How many bytes allocated */ char *ob_bytes; |