diff options
author | Armin Rigo <arigo@tunes.org> | 2004-10-28 16:32:00 (GMT) |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2004-10-28 16:32:00 (GMT) |
commit | 89a39461bff04b80bb4857790350e1ab30ff2df9 (patch) | |
tree | 54bc00a9ad30e8e49849874cfbca8543de62fa58 /Include/intobject.h | |
parent | 063e1e846dc5c3fe593cef5b14cc429369dcd2c2 (diff) | |
download | cpython-89a39461bff04b80bb4857790350e1ab30ff2df9.zip cpython-89a39461bff04b80bb4857790350e1ab30ff2df9.tar.gz cpython-89a39461bff04b80bb4857790350e1ab30ff2df9.tar.bz2 |
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/intobject.h')
-rw-r--r-- | Include/intobject.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Include/intobject.h b/Include/intobject.h index 61ef0f0..1bbd59c 100644 --- a/Include/intobject.h +++ b/Include/intobject.h @@ -11,7 +11,7 @@ returns -1 and sets errno to EBADF if the object is not an PyIntObject. None of the functions should be applied to nil objects. The type PyIntObject is (unfortunately) exposed here so we can declare -_Py_TrueStruct and _Py_ZeroStruct below; don't use this. +_Py_TrueStruct and _Py_ZeroStruct in boolobject.h; don't use this. */ #ifndef Py_INTOBJECT_H |