@@ -63,7 +63,7 @@ PyAPI_FUNC(PyObject *) _Py_stackref_get_object(_PyStackRef ref);
6363PyAPI_FUNC (PyObject * ) _Py_stackref_close (_PyStackRef ref , const char * filename , int linenumber );
6464PyAPI_FUNC (_PyStackRef ) _Py_stackref_create (PyObject * obj , uint16_t flags , const char * filename , int linenumber );
6565PyAPI_FUNC (void ) _Py_stackref_record_borrow (_PyStackRef ref , const char * filename , int linenumber );
66- PyAPI_FUNC (void ) _Py_stackref_get_borrowed_from (_PyStackRef ref , _PyStackRef * p_borrowed_from , const char * filename , int linenumber );
66+ PyAPI_FUNC (_PyStackRef ) _Py_stackref_get_borrowed_from (_PyStackRef ref , const char * filename , int linenumber );
6767PyAPI_FUNC (void ) _Py_stackref_set_borrowed_from (_PyStackRef ref , _PyStackRef borrowed_from , const char * filename , int linenumber );
6868extern void _Py_stackref_associate (PyInterpreterState * interp , PyObject * obj , _PyStackRef ref );
6969
@@ -252,8 +252,7 @@ _PyStackRef_DUP(_PyStackRef ref, const char *filename, int linenumber)
252252 }
253253 _PyStackRef new_ref = _Py_stackref_create (obj , flags , filename , linenumber );
254254 if (flags == Py_TAG_REFCNT && !_Py_IsImmortal (obj )) {
255- _PyStackRef borrowed_from ;
256- _Py_stackref_get_borrowed_from (ref , & borrowed_from , filename , linenumber );
255+ _PyStackRef borrowed_from = _Py_stackref_get_borrowed_from (ref , filename , linenumber );
257256 _Py_stackref_set_borrowed_from (new_ref , borrowed_from , filename , linenumber );
258257 }
259258 return new_ref ;
0 commit comments