Lines Matching refs:bytes
131 PyObject *bytes; in StringToChars() local
133 if (!(bytes = PyUnicode_AsEncodedString(obj, ENC_OPT, in StringToChars()
137 if (PyBytes_AsStringAndSize(bytes, (char **) &str, NULL) == -1 in StringToChars()
140 Py_DECREF(bytes); in StringToChars()
144 *todecref = bytes; in StringToChars()
4236 PyObject *bytes = NULL; in StringToLine() local
4249 if (!(bytes = PyUnicode_AsEncodedString(obj, ENC_OPT, in StringToLine()
4253 if (PyBytes_AsStringAndSize(bytes, &str, &len) == -1 in StringToLine()
4256 Py_DECREF(bytes); in StringToLine()
4288 Py_XDECREF(bytes); in StringToLine()
4301 Py_XDECREF(bytes); in StringToLine()
4314 Py_XDECREF(bytes); // Python 2 does nothing here in StringToLine()
6294 PyObject *bytes; in _ConvertFromPyObject() local
6297 bytes = PyUnicode_AsEncodedString(obj, ENC_OPT, ERRORS_ENCODE_ARG); in _ConvertFromPyObject()
6298 if (bytes == NULL) in _ConvertFromPyObject()
6301 if (PyBytes_AsStringAndSize(bytes, (char **) &str, NULL) == -1) in _ConvertFromPyObject()
6308 Py_XDECREF(bytes); in _ConvertFromPyObject()
6311 Py_XDECREF(bytes); in _ConvertFromPyObject()