diff options
author | Guido van Rossum <guido@python.org> | 2001-12-04 16:23:42 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-12-04 16:23:42 (GMT) |
commit | 6b70599450777a8b911f0eff44b18cd22f1c1e1e (patch) | |
tree | 10bb79dc54602e3226dd68774994e15a6d1af2b9 /Include/structmember.h | |
parent | ebca9fc1ba23e58d734b9ab422da6a64fa4d72e2 (diff) | |
download | cpython-6b70599450777a8b911f0eff44b18cd22f1c1e1e.zip cpython-6b70599450777a8b911f0eff44b18cd22f1c1e1e.tar.gz cpython-6b70599450777a8b911f0eff44b18cd22f1c1e1e.tar.bz2 |
Fix SF bug #486144: Uninitialized __slot__ vrbl is None.
There's now a new structmember code, T_OBJECT_EX, which is used for
all __slot__ variables (except __weakref__, which has special behavior
anyway). This new code raises AttributeError when the variable is
NULL rather than converting NULL to None.
Diffstat (limited to 'Include/structmember.h')
-rw-r--r-- | Include/structmember.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Include/structmember.h b/Include/structmember.h index 2c9f41d..98eccc0 100644 --- a/Include/structmember.h +++ b/Include/structmember.h @@ -68,6 +68,10 @@ typedef struct PyMemberDef { #define T_PSTRING_INPLACE 15 #endif /* macintosh */ +#define T_OBJECT_EX 16 /* Like T_OBJECT, but raises AttributeError + when the value is NULL, instead of + converting to None. */ + /* Flags */ #define READONLY 1 #define RO READONLY /* Shorthand */ |