bpo-35444: Fix error handling when fail to look up builtin "getattr". (GH-11047) (GH-11107)

(cherry picked from commit bb86bf4c4eaa30b1f5192dab9f389ce0bb61114d)
diff --git a/Include/ceval.h b/Include/ceval.h
index bce8a0b..11283c0 100644
--- a/Include/ceval.h
+++ b/Include/ceval.h
@@ -48,10 +48,12 @@
 PyAPI_FUNC(PyObject *) PyEval_GetLocals(void);
 PyAPI_FUNC(struct _frame *) PyEval_GetFrame(void);
 
+#ifndef Py_LIMITED_API
+/* Helper to look up a builtin object */
+PyAPI_FUNC(PyObject *) _PyEval_GetBuiltinId(_Py_Identifier *);
 /* Look at the current frame's (if any) code's co_flags, and turn on
    the corresponding compiler flags in cf->cf_flags.  Return 1 if any
    flag was set, else return 0. */
-#ifndef Py_LIMITED_API
 PyAPI_FUNC(int) PyEval_MergeCompilerFlags(PyCompilerFlags *cf);
 #endif