python string conversion
- use _PyUnicode_AsStringAndSize where possible - use %R for PyErr_Format(...) rather then running repr on the object explicitly - use const char
This commit is contained in:
@@ -363,7 +363,7 @@ error_cleanup:
|
||||
/* string conversion, escape non-unicode chars, coerce must be set to NULL */
|
||||
const char *PyC_UnicodeAsByte(PyObject *py_str, PyObject **coerce)
|
||||
{
|
||||
char *result;
|
||||
const char *result;
|
||||
|
||||
result= _PyUnicode_AsString(py_str);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user