diff options
author | Jeroen Demeyer <jeroen.k.demeyer@gmail.com> | 2020-02-18 13:14:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-18 13:14:46 (GMT) |
commit | 24bba8cf5b8db25c19bcd1d94e8e356874d1c723 (patch) | |
tree | 66da76634598a2a6bc47792cb38019adea634290 /Objects/funcobject.c | |
parent | 5d38517aa1836542a5417b724c093bcb245f0f47 (diff) | |
download | cpython-24bba8cf5b8db25c19bcd1d94e8e356874d1c723.zip cpython-24bba8cf5b8db25c19bcd1d94e8e356874d1c723.tar.gz cpython-24bba8cf5b8db25c19bcd1d94e8e356874d1c723.tar.bz2 |
bpo-36347: stop using RESTRICTED constants (GH-12684)
The constants `RESTRICTED` and `PY_WRITE_RESTRICTED` no longer have a meaning in Python 3. Therefore, CPython should not use them.
CC @matrixise
https://bugs.python.org/issue36347
Diffstat (limited to 'Objects/funcobject.c')
-rw-r--r-- | Objects/funcobject.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Objects/funcobject.c b/Objects/funcobject.c index 419db33..3ec949d 100644 --- a/Objects/funcobject.c +++ b/Objects/funcobject.c @@ -239,12 +239,10 @@ PyFunction_SetAnnotations(PyObject *op, PyObject *annotations) #define OFF(x) offsetof(PyFunctionObject, x) static PyMemberDef func_memberlist[] = { - {"__closure__", T_OBJECT, OFF(func_closure), - RESTRICTED|READONLY}, - {"__doc__", T_OBJECT, OFF(func_doc), PY_WRITE_RESTRICTED}, - {"__globals__", T_OBJECT, OFF(func_globals), - RESTRICTED|READONLY}, - {"__module__", T_OBJECT, OFF(func_module), PY_WRITE_RESTRICTED}, + {"__closure__", T_OBJECT, OFF(func_closure), READONLY}, + {"__doc__", T_OBJECT, OFF(func_doc), 0}, + {"__globals__", T_OBJECT, OFF(func_globals), READONLY}, + {"__module__", T_OBJECT, OFF(func_module), 0}, {NULL} /* Sentinel */ }; |