diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-26 10:26:52 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-26 10:31:57 +0300 |
commit | a69f985f40905b01cf542d370831e7ade138a4e3 (patch) | |
tree | 17f1e926a9f09a9461967efa92a8daedc344fc4d /source/blender/python/generic/py_capi_utils.c | |
parent | 87f598fd3f2b7968af0620b98f16bb86aa17d541 (diff) |
PyAPI: move deep-copy args check to py_capi_utils
Diffstat (limited to 'source/blender/python/generic/py_capi_utils.c')
-rw-r--r-- | source/blender/python/generic/py_capi_utils.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c index 22646462163..cee9ad3b477 100644 --- a/source/blender/python/generic/py_capi_utils.c +++ b/source/blender/python/generic/py_capi_utils.c @@ -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 |