summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorMichael W. Hudson <mwh@python.net>2005-02-17 10:43:12 (GMT)
committerMichael W. Hudson <mwh@python.net>2005-02-17 10:43:12 (GMT)
commit8ed7e2e2db9161379f001e010d5de5d775e397b9 (patch)
tree44f7df467f14a09ff386a27960ee9921611789d3 /Objects
parent8d751fa05e358e1b7bace33196feb4a45547dab3 (diff)
downloadcpython-8ed7e2e2db9161379f001e010d5de5d775e397b9.zip
cpython-8ed7e2e2db9161379f001e010d5de5d775e397b9.tar.gz
cpython-8ed7e2e2db9161379f001e010d5de5d775e397b9.tar.bz2
Backport: Fix
[ 1124295 ] Function's __name__ no longer accessible in restricted mode which I introduced with a bit of mindless copy-paste when making __name__ writable. You can't assign to __name__ in restricted mode, which I'm going to pretend was intentional :)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/funcobject.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/Objects/funcobject.c b/Objects/funcobject.c
index c7f7c9d..c0c91c9 100644
--- a/Objects/funcobject.c
+++ b/Objects/funcobject.c
@@ -262,8 +262,6 @@ func_set_code(PyFunctionObject *op, PyObject *value)
static PyObject *
func_get_name(PyFunctionObject *op)
{
- if (restricted())
- return NULL;
Py_INCREF(op->func_name);
return op->func_name;
}