Lines Matching defs:string
46 // Return a borrowed reference to the empty bytes string singleton.
53 // Return a strong reference to the empty bytes string singleton.
63 string containing exactly `size' bytes.
66 either NULL or else points to a string containing at least `size' bytes.
67 For PyBytes_FromStringAndSize(), the string in the `str' parameter does
78 allocated for string data, not counting the null terminating character.
80 PyBytes_FromStringAndSize()) or the length of the string in the `str'
95 "byte string is too large");
156 "byte string is too long");
255 /* subtract bytes preallocated for the format string
355 /* fix min_size if we reached the end of the format string */
359 /* invalid format string: copy unformatted string and exit */
404 "not enough arguments for format string");
1059 /* Unescape a backslash-escaped string. */
1089 "Trailing \\ in string");
1310 /* Compute size of output string */
1533 "Comparison between bytes and string", 1))
1549 /* a byte string is equal to itself */
2160 /* Fix the size of the resulting byte string */
2226 Return a bytes object with the given prefix string removed if present.
2228 If the bytes starts with the prefix string, return bytes[len(prefix):].
2263 Return a bytes object with the given suffix string removed if present.
2265 If the bytes ends with the suffix string and that suffix is not empty,
2358 string: unicode
2361 Create a bytes object from a string of hexadecimal numbers.
2368 bytes_fromhex_impl(PyTypeObject *type, PyObject *string)
2371 PyObject *result = _PyBytes_FromHex(string, 0);
2379 _PyBytes_FromHex(PyObject *string, int use_bytearray)
2390 assert(PyUnicode_Check(string));
2391 if (PyUnicode_READY(string))
2393 hexlen = PyUnicode_GET_LENGTH(string);
2395 if (!PyUnicode_IS_ASCII(string)) {
2396 const void *data = PyUnicode_DATA(string);
2397 unsigned int kind = PyUnicode_KIND(string);
2409 assert(PyUnicode_KIND(string) == PyUnicode_1BYTE_KIND);
2410 str = PyUnicode_1BYTE_DATA(string);
2430 invalid_char = str - PyUnicode_1BYTE_DATA(string);
2437 invalid_char = str - PyUnicode_1BYTE_DATA(string);
2464 Create a string of hexadecimal numbers from a bytes object.
2600 "encoding without a string argument" :
2601 "errors without a string argument");
2610 "encoding without a string argument");
2618 "string argument without an encoding" :
2619 "errors without a string argument");
2642 "string argument without an encoding");
2924 bytes(string, encoding[, errors]) -> bytes\n\
2931 - a text string encoded using the specified encoding\n\
3518 /* Get the empty byte string singleton */