File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ cdef inline as_pg_string_and_size(
12
12
raise TypeError (' expected str, got {}' .format(type (obj).__name__))
13
13
14
14
if settings.is_encoding_utf8():
15
- cstr[0 ] = cpythonx.PyUnicode_AsUTF8AndSize(obj, size)
15
+ cstr[0 ] = < char * > cpythonx.PyUnicode_AsUTF8AndSize(obj, size)
16
16
else :
17
17
encoded = settings.get_text_codec().encode(obj)
18
18
cpython.PyBytes_AsStringAndSize(encoded, cstr, size)
Original file line number Diff line number Diff line change @@ -13,4 +13,5 @@ cdef extern from "Python.h":
13
13
char * PyByteArray_AsString(object )
14
14
15
15
object PyUnicode_FromString(const char * u)
16
- char * PyUnicode_AsUTF8AndSize(object unicode , ssize_t * size) except NULL
16
+ const char * PyUnicode_AsUTF8AndSize(
17
+ object unicode , ssize_t * size) except NULL
You can’t perform that action at this time.
0 commit comments