gh-111178: Change Argument Clinic signature for METH_O (#130682)
Use "PyObject*" for METH_O functions to fix an undefined behavior.
This commit is contained in:
@@ -1058,8 +1058,8 @@ value via the `ContextVar.reset()` method.
|
||||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
_contextvars_ContextVar_set(PyContextVar *self, PyObject *value)
|
||||
/*[clinic end generated code: output=446ed5e820d6d60b input=c0a6887154227453]*/
|
||||
_contextvars_ContextVar_set_impl(PyContextVar *self, PyObject *value)
|
||||
/*[clinic end generated code: output=1b562d35cc79c806 input=c0a6887154227453]*/
|
||||
{
|
||||
return PyContextVar_Set((PyObject *)self, value);
|
||||
}
|
||||
@@ -1076,8 +1076,8 @@ created the token was used.
|
||||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
_contextvars_ContextVar_reset(PyContextVar *self, PyObject *token)
|
||||
/*[clinic end generated code: output=d4ee34d0742d62ee input=ebe2881e5af4ffda]*/
|
||||
_contextvars_ContextVar_reset_impl(PyContextVar *self, PyObject *token)
|
||||
/*[clinic end generated code: output=3205d2bdff568521 input=ebe2881e5af4ffda]*/
|
||||
{
|
||||
if (!PyContextToken_CheckExact(token)) {
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
|
||||
Reference in New Issue
Block a user