@@ -1800,33 +1800,6 @@ _PyEvalFramePushAndInit(PyThreadState *tstate, _PyStackRef func,
1800
1800
return NULL ;
1801
1801
}
1802
1802
1803
- static _PyInterpreterFrame *
1804
- _PyEvalFramePushAndInit_UnTagged (PyThreadState * tstate , _PyStackRef func ,
1805
- PyObject * locals , PyObject * const * args ,
1806
- size_t argcount , PyObject * kwnames , _PyInterpreterFrame * previous )
1807
- {
1808
- #if defined(Py_GIL_DISABLED )
1809
- size_t kw_count = kwnames == NULL ? 0 : PyTuple_GET_SIZE (kwnames );
1810
- size_t total_argcount = argcount + kw_count ;
1811
- _PyStackRef * tagged_args_buffer = PyMem_Malloc (sizeof (_PyStackRef ) * total_argcount );
1812
- if (tagged_args_buffer == NULL ) {
1813
- PyErr_NoMemory ();
1814
- return NULL ;
1815
- }
1816
- for (size_t i = 0 ; i < argcount ; i ++ ) {
1817
- tagged_args_buffer [i ] = PyStackRef_FromPyObjectSteal (args [i ]);
1818
- }
1819
- for (size_t i = 0 ; i < kw_count ; i ++ ) {
1820
- tagged_args_buffer [argcount + i ] = PyStackRef_FromPyObjectSteal (args [argcount + i ]);
1821
- }
1822
- _PyInterpreterFrame * res = _PyEvalFramePushAndInit (tstate , func , locals , (_PyStackRef const * )tagged_args_buffer , argcount , kwnames , previous );
1823
- PyMem_Free (tagged_args_buffer );
1824
- return res ;
1825
- #else
1826
- return _PyEvalFramePushAndInit (tstate , func , locals , (_PyStackRef const * )args , argcount , kwnames , previous );
1827
- #endif
1828
- }
1829
-
1830
1803
/* Same as _PyEvalFramePushAndInit but takes an args tuple and kwargs dict.
1831
1804
Steals references to func, callargs and kwargs.
1832
1805
*/
@@ -1851,9 +1824,9 @@ _PyEvalFramePushAndInit_Ex(PyThreadState *tstate, _PyStackRef func,
1851
1824
Py_INCREF (PyTuple_GET_ITEM (callargs , i ));
1852
1825
}
1853
1826
}
1854
- _PyInterpreterFrame * new_frame = _PyEvalFramePushAndInit_UnTagged (
1827
+ _PyInterpreterFrame * new_frame = _PyEvalFramePushAndInit (
1855
1828
tstate , func , locals ,
1856
- newargs , nargs , kwnames , previous
1829
+ ( _PyStackRef const * ) newargs , nargs , kwnames , previous
1857
1830
);
1858
1831
if (has_dict ) {
1859
1832
_PyStack_UnpackDict_FreeNoDecRef (newargs , kwnames );
@@ -1888,9 +1861,9 @@ _PyEval_Vector(PyThreadState *tstate, PyFunctionObject *func,
1888
1861
Py_INCREF (args [i + argcount ]);
1889
1862
}
1890
1863
}
1891
- _PyInterpreterFrame * frame = _PyEvalFramePushAndInit_UnTagged (
1864
+ _PyInterpreterFrame * frame = _PyEvalFramePushAndInit (
1892
1865
tstate , PyStackRef_FromPyObjectNew (func ), locals ,
1893
- args , argcount , kwnames , NULL );
1866
+ ( _PyStackRef const * ) args , argcount , kwnames , NULL );
1894
1867
if (frame == NULL ) {
1895
1868
return NULL ;
1896
1869
}
0 commit comments