File Python-3.7-compatability.patch of Package opencv33

From 0c4328fbf3da0da57a91b2133578c5100370b867 Mon Sep 17 00:00:00 2001
From: ilovezfs <ilovezfs@icloud.com>
Date: Tue, 3 Jul 2018 06:31:39 +0000
Subject: [PATCH] Python 3.7 compatability

The result of PyUnicode_AsUTF8() is now of type const char * rather of
char *.
---
 modules/python/src2/cv2.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/python/src2/cv2.cpp b/modules/python/src2/cv2.cpp
index e16fcbacf2ce..5a6bf7ef62bd 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);
openSUSE Build Service is sponsored by