@@ -1535,7 +1535,7 @@ dummy_func(
15351535
15361536 inst (LOAD_BUILD_CLASS , ( -- bc )) {
15371537 PyObject * bc_o ;
1538- int err = _PyEval_Mapping_GetOptionalItem (BUILTINS (), & _Py_ID (__build_class__ ), & bc_o );
1538+ int err = PyMapping_GetOptionalItem (BUILTINS (), & _Py_ID (__build_class__ ), & bc_o );
15391539 ERROR_IF (err < 0 );
15401540 if (bc_o == NULL ) {
15411541 _PyErr_SetString (tstate , PyExc_NameError ,
@@ -1739,7 +1739,7 @@ dummy_func(
17391739 inst (LOAD_FROM_DICT_OR_GLOBALS , (mod_or_class_dict -- v )) {
17401740 PyObject * name = GETITEM (FRAME_CO_NAMES , oparg );
17411741 PyObject * v_o ;
1742- int err = _PyEval_Mapping_GetOptionalItem (PyStackRef_AsPyObjectBorrow (mod_or_class_dict ), name , & v_o );
1742+ int err = PyMapping_GetOptionalItem (PyStackRef_AsPyObjectBorrow (mod_or_class_dict ), name , & v_o );
17431743 PyStackRef_CLOSE (mod_or_class_dict );
17441744 ERROR_IF (err < 0 );
17451745 if (v_o == NULL ) {
@@ -1762,11 +1762,11 @@ dummy_func(
17621762 else {
17631763 /* Slow-path if globals or builtins is not a dict */
17641764 /* namespace 1: globals */
1765- int err = _PyEval_Mapping_GetOptionalItem (GLOBALS (), name , & v_o );
1765+ int err = PyMapping_GetOptionalItem (GLOBALS (), name , & v_o );
17661766 ERROR_IF (err < 0 );
17671767 if (v_o == NULL ) {
17681768 /* namespace 2: builtins */
1769- int err = _PyEval_Mapping_GetOptionalItem (BUILTINS (), name , & v_o );
1769+ int err = PyMapping_GetOptionalItem (BUILTINS (), name , & v_o );
17701770 ERROR_IF (err < 0 );
17711771 if (v_o == NULL ) {
17721772 _PyEval_FormatExcCheckArg (
@@ -1932,7 +1932,7 @@ dummy_func(
19321932 assert (class_dict );
19331933 assert (oparg >= 0 && oparg < _PyFrame_GetCode (frame )-> co_nlocalsplus );
19341934 name = PyTuple_GET_ITEM (_PyFrame_GetCode (frame )-> co_localsplusnames , oparg );
1935- int err = _PyEval_Mapping_GetOptionalItem (class_dict , name , & value_o );
1935+ int err = PyMapping_GetOptionalItem (class_dict , name , & value_o );
19361936 if (err < 0 ) {
19371937 ERROR_NO_POP ();
19381938 }
@@ -2122,7 +2122,7 @@ dummy_func(
21222122 ERROR_IF (true);
21232123 }
21242124 /* check if __annotations__ in locals()... */
2125- int err = _PyEval_Mapping_GetOptionalItem (LOCALS (), & _Py_ID (__annotations__ ), & ann_dict );
2125+ int err = PyMapping_GetOptionalItem (LOCALS (), & _Py_ID (__annotations__ ), & ann_dict );
21262126 ERROR_IF (err < 0 );
21272127 if (ann_dict == NULL ) {
21282128 ann_dict = PyDict_New ();
@@ -2227,10 +2227,10 @@ dummy_func(
22272227 // we make no attempt to optimize here; specializations should
22282228 // handle any case whose performance we care about
22292229 PyObject * super ;
2230- Py_BEGIN_LOCALS_MUST_NOT_ESCAPE ;
2231- PyObject * stack [] = {class , self };
2232- super = PyObject_Vectorcall (global_super , stack , oparg & 2 , NULL );
2233- Py_END_LOCALS_MUST_NOT_ESCAPE ;
2230+ {
2231+ PyObject * stack [] = {class , self };
2232+ super = PyObject_Vectorcall (global_super , stack , oparg & 2 , NULL );
2233+ }
22342234 if (opcode == INSTRUMENTED_LOAD_SUPER_ATTR ) {
22352235 PyObject * arg = oparg & 2 ? class : & _PyInstrumentation_MISSING ;
22362236 if (super == NULL ) {
@@ -2290,11 +2290,11 @@ dummy_func(
22902290 PyTypeObject * cls = (PyTypeObject * )class ;
22912291 int method_found = 0 ;
22922292 PyObject * attr_o ;
2293- Py_BEGIN_LOCALS_MUST_NOT_ESCAPE ;
2294- int * method_found_ptr = & method_found ;
2295- attr_o = _PySuper_Lookup (cls , self , name ,
2296- Py_TYPE (self )-> tp_getattro == PyObject_GenericGetAttr ? method_found_ptr : NULL );
2297- Py_END_LOCALS_MUST_NOT_ESCAPE ;
2293+ {
2294+ int * method_found_ptr = & method_found ;
2295+ attr_o = _PySuper_Lookup (cls , self , name ,
2296+ Py_TYPE (self )-> tp_getattro == PyObject_GenericGetAttr ? method_found_ptr : NULL );
2297+ }
22982298 if (attr_o == NULL ) {
22992299 ERROR_NO_POP ();
23002300 }
@@ -3518,12 +3518,12 @@ dummy_func(
35183518 assert (PyStackRef_IsTaggedInt (lasti ));
35193519 (void )lasti ; // Shut up compiler warning if asserts are off
35203520 PyObject * res_o ;
3521- Py_BEGIN_LOCALS_MUST_NOT_ESCAPE ;
3522- PyObject * stack [5 ] = {NULL , PyStackRef_AsPyObjectBorrow (exit_self ), exc , val_o , tb };
3523- int has_self = !PyStackRef_IsNull (exit_self );
3524- res_o = PyObject_Vectorcall (exit_func_o , stack + 2 - has_self ,
3525- (3 + has_self ) | PY_VECTORCALL_ARGUMENTS_OFFSET , NULL );
3526- Py_END_LOCALS_MUST_NOT_ESCAPE ;
3521+ {
3522+ PyObject * stack [5 ] = {NULL , PyStackRef_AsPyObjectBorrow (exit_self ), exc , val_o , tb };
3523+ int has_self = !PyStackRef_IsNull (exit_self );
3524+ res_o = PyObject_Vectorcall (exit_func_o , stack + 2 - has_self ,
3525+ (3 + has_self ) | PY_VECTORCALL_ARGUMENTS_OFFSET , NULL );
3526+ }
35273527 Py_XDECREF (original_tb );
35283528 ERROR_IF (res_o == NULL );
35293529 res = PyStackRef_FromPyObjectSteal (res_o );
0 commit comments