PyAPI: move deep-copy args check to py_capi_utils

This commit is contained in:
2018-06-26 09:26:52 +02:00
parent 87f598fd3f
commit a69f985f40
9 changed files with 21 additions and 15 deletions

View File

@@ -230,6 +230,12 @@ int PyC_ParseBool(PyObject *o, void *p)
return 1;
}
/* silly function, we dont use arg. just check its compatible with __deepcopy__ */
int PyC_CheckArgs_DeepCopy(PyObject *args)
{
PyObject *dummy_pydict;
return PyArg_ParseTuple(args, "|O!:__deepcopy__", &PyDict_Type, &dummy_pydict) != 0;
}
#ifndef MATH_STANDALONE