Fix return type of PyUnicodeAsUtf8Compat to const char*
to precisely match to the return type of PyUnicode_AsUTF8
.
PiperOrigin-RevId: 332504252 Change-Id: I08d5b53c6716a1195b66b93262aa190065eed053
This commit is contained in:
parent
effefef880
commit
637d6ebbdf
@ -21,7 +21,7 @@ limitations under the License.
|
||||
#include "tensorflow/python/lib/core/safe_pyobject_ptr.h"
|
||||
|
||||
namespace {
|
||||
inline char* PyUnicodeAsUtf8Compat(PyObject* obj) {
|
||||
inline const char* PyUnicodeAsUtf8Compat(PyObject* obj) {
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
return PyString_AS_STRING(obj);
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user