Commit Graph

2 Commits

Author SHA1 Message Date
Michael Pratt
8aafd569c8 Support PyString_AsString() in Python 3 < 3.3
In Python 3, version 3.3+, PyUnicode_AsUTF8() provides similar
functionality to Python 2's PyString_AsString().

In older versions of Python 3, there is no public function to provide
the same functionality.  However, the "internal" _PyUnicode_AsString()
does provide that functionality, so use it to replace
PyString_AsString().

With this patch, cv2 should compile for Python 3.[0-2].
2013-11-07 23:47:33 -05:00
Gabe Schwartz
fb9781b97b Updated cv2.cpp to support Python 3 API.
Added a header with defines to enable the module to compile with either
python 2 or 3 without changes.
2013-06-13 20:10:01 -04:00