I have a extension class which including C++ member (std::vector<my_struct>, and my_struct has some std::pair<int, int> members).
And there also has a std::pair<int, int> type definition in the same source.
I'm found that the conversion function (std::pair<int, int> to tuple[int, int]) is defined twice unless added @cython.auto_pickle(False) on my extension class.
11510:18: error: redefinition of 'PyObject* __pyx_convert_pair_to_py_int____int(const std::pair<int, int>&)'
static PyObject *__pyx_convert_pair_to_py_int____int(std::pair<int,int> const &__pyx_v_p) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10055:18: note: 'PyObject* __pyx_convert_pair_to_py_int____int(const std::pair<int, int>&)' previously defined here
static PyObject *__pyx_convert_pair_to_py_int____int(std::pair<int,int> const &__pyx_v_p) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I'm not clearly know how Cython checks the tool functions of ctypedef.
In another case My extension members are sharing a same ctypedef with local variables, but this error is not occurred.
I have a extension class which including C++ member (
std::vector<my_struct>, andmy_structhas somestd::pair<int, int>members).And there also has a
std::pair<int, int>type definition in the same source.I'm found that the conversion function (
std::pair<int, int>totuple[int, int]) is defined twice unless added@cython.auto_pickle(False)on my extension class.I'm not clearly know how Cython checks the tool functions of
ctypedef.In another case My extension members are sharing a same
ctypedefwith local variables, but this error is not occurred.