Issue #20284: Fix a compilation warning on Windows

Explicitly cast the long to char.
This commit is contained in:
Victor Stinner 2015-01-26 16:43:36 +01:00
parent 29dacf2e97
commit 5474d0ba19
1 changed files with 1 additions and 1 deletions

View File

@ -529,7 +529,7 @@ formatchar(char *buf, size_t buflen, PyObject *v)
"%c requires an integer in range(256) or a single byte");
goto error;
}
buf[0] = ival;
buf[0] = (char)ival;
}
Py_XDECREF(w);
buf[1] = '\0';