File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -762,19 +762,17 @@ pycore_init_builtins(PyThreadState *tstate)
762762 }
763763 interp -> builtins = Py_NewRef (builtins_dict );
764764
765- PyObject * isinstance ;
766- if (PyDict_GetItemRef ( builtins_dict , & _Py_ID ( isinstance ), & isinstance ) != 1 ) {
765+ PyObject * isinstance = PyDict_GetItemWithError ( builtins_dict , & _Py_ID ( isinstance )) ;
766+ if (! isinstance ) {
767767 goto error ;
768768 }
769769 interp -> callable_cache .isinstance = isinstance ;
770- Py_DECREF (isinstance );
771770
772- PyObject * len ;
773- if (PyDict_GetItemRef ( builtins_dict , & _Py_ID ( len ), & len ) != 1 ) {
771+ PyObject * len = PyDict_GetItemWithError ( builtins_dict , & _Py_ID ( len )) ;
772+ if (! len ) {
774773 goto error ;
775774 }
776775 interp -> callable_cache .len = len ;
777- Py_DECREF (len );
778776
779777 PyObject * list_append = _PyType_Lookup (& PyList_Type , & _Py_ID (append ));
780778 if (list_append == NULL ) {
You can’t perform that action at this time.
0 commit comments