Fix compiler warnings in the pystrehex module (GH-13730)

This commit is contained in:
Pablo Galindo 2019-06-01 21:02:08 +01:00 committed by GitHub
parent faa2948654
commit 938d9a0167
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -11,11 +11,11 @@ static PyObject *_Py_strhex_impl(const char* argbuf, const Py_ssize_t arglen,
PyObject *retval; PyObject *retval;
Py_UCS1* retbuf; Py_UCS1* retbuf;
Py_ssize_t i, j, resultlen = 0; Py_ssize_t i, j, resultlen = 0;
Py_UCS1 sep_char; Py_UCS1 sep_char = 0;
unsigned int abs_bytes_per_sep; unsigned int abs_bytes_per_sep;
if (sep) { if (sep) {
Py_ssize_t seplen = PyObject_Length(sep); Py_ssize_t seplen = PyObject_Length((PyObject*)sep);
if (seplen < 0) { if (seplen < 0) {
return NULL; return NULL;
} }