diff options
author | Armin Rigo <arigo@tunes.org> | 2004-10-28 16:32:00 +0000 |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2004-10-28 16:32:00 +0000 |
commit | 89a39461bff04b80bb4857790350e1ab30ff2df9 (patch) | |
tree | 54bc00a9ad30e8e49849874cfbca8543de62fa58 /Include/cellobject.h | |
parent | Trigger a few error cases in Modules/_codecsmodule.c. (diff) | |
download | cpython-89a39461bff04b80bb4857790350e1ab30ff2df9.tar.gz cpython-89a39461bff04b80bb4857790350e1ab30ff2df9.tar.bz2 cpython-89a39461bff04b80bb4857790350e1ab30ff2df9.zip |
Wrote down the invariants of some common objects whose structure is
exposed in header files. Fixed a few comments in these headers.
As we might have expected, writing down invariants systematically exposed a
(minor) bug. In this case, function objects have a writeable func_code
attribute, which could be set to code objects with the wrong number of
free variables. Calling the resulting function segfaulted the interpreter.
Added a corresponding test.
Diffstat (limited to 'Include/cellobject.h')
-rw-r--r-- | Include/cellobject.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Include/cellobject.h b/Include/cellobject.h index 2a6dcaa483a..fd186e28c26 100644 --- a/Include/cellobject.h +++ b/Include/cellobject.h @@ -8,7 +8,7 @@ extern "C" { typedef struct { PyObject_HEAD - PyObject *ob_ref; + PyObject *ob_ref; /* Content of the cell or NULL when empty */ } PyCellObject; PyAPI_DATA(PyTypeObject) PyCell_Type; |