mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-127945: acquire critical section around PyCFuncPtr_call
(#131898)
This commit is contained in:
parent
28e476f6a2
commit
46ada1e5e0
1 changed files with 11 additions and 1 deletions
|
@ -4406,7 +4406,7 @@ _build_result(PyObject *result, PyObject *callargs,
|
|||
}
|
||||
|
||||
static PyObject *
|
||||
PyCFuncPtr_call(PyObject *op, PyObject *inargs, PyObject *kwds)
|
||||
PyCFuncPtr_call_lock_held(PyObject *op, PyObject *inargs, PyObject *kwds)
|
||||
{
|
||||
PyObject *restype;
|
||||
PyObject *converters;
|
||||
|
@ -4544,6 +4544,16 @@ PyCFuncPtr_call(PyObject *op, PyObject *inargs, PyObject *kwds)
|
|||
outmask, inoutmask, numretvals);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
PyCFuncPtr_call(PyObject *op, PyObject *inargs, PyObject *kwds)
|
||||
{
|
||||
PyObject *result;
|
||||
Py_BEGIN_CRITICAL_SECTION(op);
|
||||
result = PyCFuncPtr_call_lock_held(op, inargs, kwds);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
return result;
|
||||
}
|
||||
|
||||
static int
|
||||
PyCFuncPtr_traverse(PyObject *op, visitproc visit, void *arg)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue