Lines Matching defs:bytes
1019 * subclasses, and bytes and their subclasses. What
1024 * bytes we decode to wchar_t * and return that.
1027 * to bytes using PyUnicode_FSConverter, then we
1028 * extract the char * from the bytes object and
1055 * Points to the path if it was expressed as bytes,
1056 * or it was Unicode and was encoded to bytes. (On Windows,
1057 * is a non-zero integer if the path was expressed as bytes.
1140 PyObject *bytes = NULL;
1205 "expected %.200s.__fspath__() to return str or bytes, "
1247 if (!PyUnicode_FSConverter(o, &bytes)) {
1253 bytes = o;
1254 Py_INCREF(bytes);
1258 after removing support of non-bytes buffer objects. */
1264 path->allow_fd && path->nullable ? "string, bytes, os.PathLike, "
1266 path->allow_fd ? "string, bytes, os.PathLike or integer" :
1267 path->nullable ? "string, bytes, os.PathLike or None" :
1268 "string, bytes or os.PathLike",
1272 bytes = PyBytes_FromObject(o);
1273 if (!bytes) {
1295 path->allow_fd && path->nullable ? "string, bytes, os.PathLike, "
1297 path->allow_fd ? "string, bytes, os.PathLike or integer" :
1298 path->nullable ? "string, bytes, os.PathLike or None" :
1299 "string, bytes or os.PathLike",
1304 length = PyBytes_GET_SIZE(bytes);
1305 narrow = PyBytes_AS_STRING(bytes);
1342 Py_DECREF(bytes);
1351 if (bytes == o) {
1354 Py_DECREF(bytes);
1357 path->cleanup = bytes;
1369 Py_XDECREF(bytes);
2134 {"st_size", "total size, in bytes"},
2881 Path to be examined; can be string, bytes, a path-like object or
2943 Path to be tested; can be string, bytes, or a path-like object.
3219 Path to be modified. May always be specified as a str, bytes, or a path-like object.
3615 Path to be examined; can be string, bytes, a path-like object, or open-file-descriptor int.
3903 Return a bytes string representing the current working directory.
4141 int return_str; /* if false, return bytes */
4162 "listdir: path should be string, bytes, os.PathLike or None, not int");
4172 /* only return bytes if they specified a bytes-like object */
4256 path can be specified as either str, bytes, or a path-like object. If path is bytes,
4257 the filenames returned will also be bytes; in all other circumstances
5000 const char *bytes = PyBytes_AsString(command);
5007 result = system(bytes);
9525 The number of bytes to lock, starting at the current position.
9564 Return the new cursor position in number of bytes
9605 Read from a file descriptor. Returns a bytes object.
9706 The buffers should be mutable buffers accepting bytes.
9711 readv returns the total number of bytes read,
9764 Read a number of bytes from a file descriptor starting at a particular offset.
9766 Read length bytes from file descriptor fd, starting at offset bytes from
9814 Reads from a file descriptor into a number of mutable bytes-like objects.
9820 will return the total number of bytes read (which can be less than the total
9913 Write a bytes object to a file descriptor.
9936 Copy count bytes from file descriptor in_fd to file descriptor out_fd.
9956 Copy count bytes from file descriptor in_fd to file descriptor out_fd.
9973 Copy count bytes from file descriptor in_fd to file descriptor out_fd.
10365 Returns the total number of bytes written.
10366 buffers must be a sequence of bytes-like objects.
10416 Write bytes to a file descriptor starting at a particular offset.
10418 Write buffer to fd, starting at offset bytes from the beginning of
10419 the file. Returns the number of bytes writte. Does not change the
10454 Writes the contents of bytes-like objects to a file descriptor at a given offset.
10457 of bytes-like objects. Buffers are processed in array order. Entire contents of first
10461 the total number of bytes written.
10557 Number of bytes to copy.
10563 Copy count bytes from one file descriptor to another.
10626 Number of bytes to copy.
10634 Transfer count bytes from one pipe to a descriptor or vice versa.
10979 Ensure a file has allocated at least a particular number of bytes on disk.
10981 Ensure that the file specified by fd encompasses a range of bytes
10982 starting at offset bytes from the beginning and continuing for length bytes.
11026 offset and continuing for length bytes.
13184 Return a bytes object containing random bytes suitable for cryptographic use.
13191 PyObject *bytes;
13197 bytes = PyBytes_FromStringAndSize(NULL, size);
13198 if (bytes == NULL)
13201 result = _PyOS_URandom(PyBytes_AS_STRING(bytes), PyBytes_GET_SIZE(bytes));
13203 Py_DECREF(bytes);
13206 return bytes;
13223 const char *bytes = PyBytes_AS_STRING(name);
13225 fd = memfd_create(bytes, flags);
14448 path can be specified as either str, bytes, or a path-like object. If path
14449 is bytes, the names of yielded DirEntry objects will also be bytes; in
14521 "scandir: path should be string, bytes, os.PathLike or None, not int");
14561 If the object is str or bytes, then allow it to pass through with
14581 "expected str, bytes or os.PathLike object, "
14594 "expected %.200s.__fspath__() to return str or bytes, "
14611 If the object is str or bytes, then allow it to pass through as-is. If the
14630 Obtain a series of random bytes.
14637 PyObject *bytes;
14645 bytes = PyBytes_FromStringAndSize(NULL, size);
14646 if (bytes == NULL) {
14653 PyBytes_AS_STRING(bytes),
14654 PyBytes_GET_SIZE(bytes),
14673 _PyBytes_Resize(&bytes, n);
14676 return bytes;
14679 Py_DECREF(bytes);