Add _PyBuffer_Release_in_interpreter().
This commit is contained in:
parent
9849dc02fb
commit
1c0b35eb0e
|
@ -198,6 +198,8 @@ PyAPI_FUNC(const PyConfig*) _Py_GetConfig(void);
|
|||
/* cross-interpreter operations */
|
||||
|
||||
PyAPI_FUNC(int) _Py_DECREF_in_interpreter(PyInterpreterState *, PyObject *);
|
||||
PyAPI_FUNC(int) _PyBuffer_Release_in_interpreter(PyInterpreterState *,
|
||||
Py_buffer *);
|
||||
|
||||
/* cross-interpreter data */
|
||||
|
||||
|
|
|
@ -1495,6 +1495,19 @@ _Py_DECREF_in_interpreter(PyInterpreterState *interp, PyObject *obj)
|
|||
return _PyEval_AddPendingCall(interp, _decref_pyobj, obj);
|
||||
}
|
||||
|
||||
static int
|
||||
_release_pybuf(void *view)
|
||||
{
|
||||
PyBuffer_Release((Py_buffer *)view);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
_PyBuffer_Release_in_interpreter(PyInterpreterState *interp, Py_buffer *view)
|
||||
{
|
||||
return _PyEval_AddPendingCall(interp, _release_pybuf, view);
|
||||
}
|
||||
|
||||
/* cross-interpreter data */
|
||||
|
||||
crossinterpdatafunc _PyCrossInterpreterData_Lookup(PyObject *);
|
||||
|
|
Loading…
Reference in New Issue