projects
/
platform
/
upstream
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c52b4cf
)
Python 3.7 compatability
author
ilovezfs
<ilovezfs@icloud.com>
Tue, 3 Jul 2018 06:31:39 +0000
(06:31 +0000)
committer
ilovezfs
<ilovezfs@icloud.com>
Tue, 3 Jul 2018 07:38:59 +0000
(
00:38
-0700)
The result of PyUnicode_AsUTF8() is now of type const char * rather of
char *.
modules/python/src2/cv2.cpp
patch
|
blob
|
history
diff --git
a/modules/python/src2/cv2.cpp
b/modules/python/src2/cv2.cpp
index
e16fcba
..
5a6bf7e
100644
(file)
--- 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);
+ c
onst c
har* str = PyString_AsString(obj);
if(!str)
return false;
value = String(str);