Skip to content

Commit 1ddfafe

Browse files
committed
call framelocalsproxy_new_impl() directly in _PyFrameLocalsProxy_New
1 parent af9df82 commit 1ddfafe

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

‎Objects/frameobject.c‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,14 +1016,7 @@ PyTypeObject PyFrameLocalsProxy_Type = {
10161016
PyObject *
10171017
_PyFrameLocalsProxy_New(PyFrameObject *frame)
10181018
{
1019-
PyObject* args = PyTuple_Pack(1, frame);
1020-
if (args == NULL) {
1021-
return NULL;
1022-
}
1023-
1024-
PyObject* proxy = framelocalsproxy_new(&PyFrameLocalsProxy_Type, args, NULL);
1025-
Py_DECREF(args);
1026-
return proxy;
1019+
return framelocalsproxy_new_impl(&PyFrameLocalsProxy_Type, (PyObject *)frame);
10271020
}
10281021

10291022
static PyMemberDef frame_memberlist[] = {

0 commit comments

Comments
 (0)