Skip to content

Commit 4cd3b4b

Browse files
committed
Remove type __frozendict__
1 parent 7103865 commit 4cd3b4b

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

Objects/typeobject.c

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4891,37 +4891,6 @@ type_new_init(type_new_ctx *ctx)
48914891
}
48924892

48934893

4894-
static int
4895-
type_new_frozendict(PyTypeObject *type)
4896-
{
4897-
PyObject *__frozendict__;
4898-
if (PyDict_GetItemStringRef(type->tp_dict, "__frozendict__",
4899-
&__frozendict__) < 0) {
4900-
return -1;
4901-
}
4902-
if (__frozendict__ == NULL) {
4903-
return 0;
4904-
}
4905-
int is_true = PyObject_IsTrue(__frozendict__);
4906-
Py_DECREF(__frozendict__);
4907-
if (is_true < 0) {
4908-
return -1;
4909-
}
4910-
if (!is_true) {
4911-
return 0;
4912-
}
4913-
4914-
PyObject *frozendict;
4915-
frozendict = PyObject_CallOneArg((PyObject*)&PyFrozenDict_Type, type->tp_dict);
4916-
if (frozendict == NULL) {
4917-
return -1;
4918-
}
4919-
4920-
Py_SETREF(type->tp_dict, frozendict);
4921-
return 0;
4922-
}
4923-
4924-
49254894
static PyObject*
49264895
type_new_impl(type_new_ctx *ctx)
49274896
{
@@ -4961,10 +4930,6 @@ type_new_impl(type_new_ctx *ctx)
49614930
goto error;
49624931
}
49634932

4964-
if (type_new_frozendict(type) < 0) {
4965-
goto error;
4966-
}
4967-
49684933
assert(_PyType_CheckConsistency(type));
49694934
#if defined(Py_GIL_DISABLED) && defined(Py_DEBUG) && SIZEOF_VOID_P > 4
49704935
// After this point, other threads can potentally use this type.

0 commit comments

Comments
 (0)