core: export getCPUFeaturesLine to bindings#16531
Conversation
|
@paroj Thanks for contribution to OpenCV project. Could you add test for Python to check that string reported in bindings is not empty at least. It helps to check regressions with CI in automated way. |
|
This patch should go into 3.4 branch first. We will merge changes from 3.4 into master regularly (weekly/bi-weekly). So, please:
Note: no need to re-open PR, apply changes "inplace". |
Actually, It can be empty on some platforms or build configurations. |
f9119b1 to
3167bd0
Compare
a9d5de6 to
a10b951
Compare
bindings generator in 3.4 does not seem to cope with std::string type, changed back to master |
Please add this to cv2.cpp: template<>
PyObject* pyopencv_from(const String& value)
{
return PyString_FromString(value.empty() ? "" : value.c_str());
}
+
+#if CV_VERSION_MAJOR == 3
+template<>
+PyObject* pyopencv_from(const std::string& value)
+{
+ return PyString_FromString(value.empty() ? "" : value.c_str());
+}
+#endif |
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.