Kaydet (Commit) 19ff1064 authored tarafından Stephan Bergmann's avatar Stephan Bergmann Kaydeden (comit) Michael Stahl

const fixes for python3-devel-3.7.0-1.fc29.x86_64

Change-Id: Ia16a8b828e11ce36e9bb77ecf9e8a1179bd9b90c
Reviewed-on: https://gerrit.libreoffice.org/56841
Tested-by: Jenkins
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
(cherry picked from commit 76a29148)
Reviewed-on: https://gerrit.libreoffice.org/56913Reviewed-by: 's avatarMichael Stahl <Michael.Stahl@cib.de>
üst 41a780a5
...@@ -80,7 +80,7 @@ inline PyObject* PyStr_FromString(const char *string) ...@@ -80,7 +80,7 @@ inline PyObject* PyStr_FromString(const char *string)
return PyUnicode_FromString(string); return PyUnicode_FromString(string);
} }
inline char * PyStr_AsString(PyObject *object) inline char const * PyStr_AsString(PyObject *object)
{ {
return PyUnicode_AsUTF8(object); return PyUnicode_AsUTF8(object);
} }
......
...@@ -157,7 +157,7 @@ Any PyEnum2Enum( PyObject *obj ) ...@@ -157,7 +157,7 @@ Any PyEnum2Enum( PyObject *obj )
} }
OUString strTypeName( OUString::createFromAscii( PyStr_AsString( typeName.get() ) ) ); OUString strTypeName( OUString::createFromAscii( PyStr_AsString( typeName.get() ) ) );
char *stringValue = PyStr_AsString( value.get() ); char const *stringValue = PyStr_AsString( value.get() );
TypeDescription desc( strTypeName ); TypeDescription desc( strTypeName );
if( !desc.is() ) if( !desc.is() )
......
...@@ -69,7 +69,7 @@ OUString pyString2ustring( PyObject *pystr ) ...@@ -69,7 +69,7 @@ OUString pyString2ustring( PyObject *pystr )
#else #else
#if PY_MAJOR_VERSION >= 3 #if PY_MAJOR_VERSION >= 3
Py_ssize_t size(0); Py_ssize_t size(0);
char *pUtf8(PyUnicode_AsUTF8AndSize(pystr, &size)); char const *pUtf8(PyUnicode_AsUTF8AndSize(pystr, &size));
ret = OUString(pUtf8, size, RTL_TEXTENCODING_UTF8); ret = OUString(pUtf8, size, RTL_TEXTENCODING_UTF8);
#else #else
PyObject* pUtf8 = PyUnicode_AsUTF8String(pystr); PyObject* pUtf8 = PyUnicode_AsUTF8String(pystr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment