python: visibility

This commit is contained in:
Alexander Alekhin
2019-06-04 17:40:24 +03:00
committed by Alexander Alekhin
parent 4a8fd71a2e
commit f5ca9d3fe1
2 changed files with 6 additions and 3 deletions
+6 -2
View File
@@ -1769,8 +1769,12 @@ static int to_ok(PyTypeObject *to)
}
#if defined(__GNUC__)
#pragma GCC visibility push(default)
#endif
#if PY_MAJOR_VERSION >= 3
extern "C" CV_EXPORTS PyObject* PyInit_cv2();
PyMODINIT_FUNC PyInit_cv2();
static struct PyModuleDef cv2_moduledef =
{
PyModuleDef_HEAD_INIT,
@@ -1783,7 +1787,7 @@ static struct PyModuleDef cv2_moduledef =
PyObject* PyInit_cv2()
#else
extern "C" CV_EXPORTS void initcv2();
PyMODINIT_FUNC initcv2();
void initcv2()
#endif