PyAPI: move deep-copy args check to py_capi_utils
This commit is contained in:
@@ -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
|
||||
|
||||
|
@@ -106,6 +106,7 @@ bool PyC_RunString_AsString(const char *expr, const char *filename, char **r_val
|
||||
|
||||
int PyC_ParseBool(PyObject *o, void *p);
|
||||
|
||||
int PyC_CheckArgs_DeepCopy(PyObject *args);
|
||||
|
||||
/* Integer parsing (with overflow checks), -1 on error. */
|
||||
int PyC_Long_AsBool(PyObject *value);
|
||||
|
Reference in New Issue
Block a user