blob: d96011330d633b79832788fe53530958f380247d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
commit 0c4328fbf3da0da57a91b2133578c5100370b867
Author: ilovezfs <ilovezfs@icloud.com>
Date: Tue Jul 3 06:31:39 2018 +0000
Python 3.7 compatability
The result of PyUnicode_AsUTF8() is now of type const char * rather of
char *.
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);
|