@@ -5853,6 +5853,46 @@ test_float_unpack(PyObject *self, PyObject *args)
58535853 return PyFloat_FromDouble (d );
58545854}
58555855
5856+ static PyObject *
5857+ frame_getlocals (PyObject * self , PyObject * frame )
5858+ {
5859+ if (!PyFrame_Check (frame )) {
5860+ PyErr_SetString (PyExc_TypeError , "argument must be a frame" );
5861+ return NULL ;
5862+ }
5863+ return PyFrame_GetLocals ((PyFrameObject * )frame );
5864+ }
5865+
5866+ static PyObject *
5867+ frame_getglobals (PyObject * self , PyObject * frame )
5868+ {
5869+ if (!PyFrame_Check (frame )) {
5870+ PyErr_SetString (PyExc_TypeError , "argument must be a frame" );
5871+ return NULL ;
5872+ }
5873+ return PyFrame_GetGlobals ((PyFrameObject * )frame );
5874+ }
5875+
5876+ static PyObject *
5877+ frame_getgenerator (PyObject * self , PyObject * frame )
5878+ {
5879+ if (!PyFrame_Check (frame )) {
5880+ PyErr_SetString (PyExc_TypeError , "argument must be a frame" );
5881+ return NULL ;
5882+ }
5883+ return PyFrame_GetGenerator ((PyFrameObject * )frame );
5884+ }
5885+
5886+ static PyObject *
5887+ frame_getbuiltins (PyObject * self , PyObject * frame )
5888+ {
5889+ if (!PyFrame_Check (frame )) {
5890+ PyErr_SetString (PyExc_TypeError , "argument must be a frame" );
5891+ return NULL ;
5892+ }
5893+ return PyFrame_GetBuiltins ((PyFrameObject * )frame );
5894+ }
5895+
58565896
58575897static PyObject * negative_dictoffset (PyObject * , PyObject * );
58585898static PyObject * test_buildvalue_issue38913 (PyObject * , PyObject * );
@@ -6142,6 +6182,10 @@ static PyMethodDef TestMethods[] = {
61426182 {"test_tstate_capi" , test_tstate_capi , METH_NOARGS , NULL },
61436183 {"float_pack" , test_float_pack , METH_VARARGS , NULL },
61446184 {"float_unpack" , test_float_unpack , METH_VARARGS , NULL },
6185+ {"frame_getlocals" , frame_getlocals , METH_O , NULL },
6186+ {"frame_getglobals" , frame_getglobals , METH_O , NULL },
6187+ {"frame_getgenerator" , frame_getgenerator , METH_O , NULL },
6188+ {"frame_getbuiltins" , frame_getbuiltins , METH_O , NULL },
61456189 {NULL , NULL } /* sentinel */
61466190};
61476191
0 commit comments