summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorilovezfs <ilovezfs@icloud.com>2018-07-03 06:31:39 +0000
committerilovezfs <ilovezfs@icloud.com>2018-07-03 00:38:59 -0700
commit0c4328fbf3da0da57a91b2133578c5100370b867 (patch)
treedf0648fbc87f360a7ed665f29048f6f01dd94c69
parentc52b4cf450e40bb0857112cdf34ef681a12aeb18 (diff)
downloadopencv-0c4328fbf3da0da57a91b2133578c5100370b867.tar.gz
opencv-0c4328fbf3da0da57a91b2133578c5100370b867.tar.bz2
opencv-0c4328fbf3da0da57a91b2133578c5100370b867.zip
Python 3.7 compatability
The result of PyUnicode_AsUTF8() is now of type const char * rather of char *.
-rw-r--r--modules/python/src2/cv2.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/python/src2/cv2.cpp b/modules/python/src2/cv2.cpp
index e16fcbacf2..5a6bf7ef62 100644
--- a/modules/python/src2/cv2.cpp
+++ b/modules/python/src2/cv2.cpp
@@ -916,7 +916,7 @@ bool pyopencv_to(PyObject* obj, String& value, const char* name)
(void)name;
if(!obj || obj == Py_None)
return true;
- char* str = PyString_AsString(obj);
+ const char* str = PyString_AsString(obj);
if(!str)
return false;
value = String(str);