Lines Matching defs:offset

57     Py_ssize_t offset;
1406 codes->offset = size;
1415 codes->offset = size;
1424 codes->offset = size;
1541 const char *res = startfrom + code->offset;
1602 offset: Py_ssize_t = 0
1608 The buffer's size in bytes, starting at position offset, must be
1616 Py_ssize_t offset)
1622 if (offset < 0) {
1623 if (offset + self->s_size > 0) {
1625 "not enough data to unpack %zd bytes at offset %zd",
1627 offset);
1631 if (offset + buffer->len < 0) {
1633 "offset %zd out of range for %zd-byte buffer",
1634 offset,
1638 offset += buffer->len;
1641 if ((buffer->len - offset) < self->s_size) {
1644 "unpacking %zd bytes at offset %zd "
1646 (size_t)self->s_size + (size_t)offset,
1648 offset,
1652 return s_unpack_internal(self, (char*)buffer->buf + offset, state);
1804 * Takes a struct object, a tuple of arguments, and offset in that tuple of
1812 s_pack_internal(PyStructObject *soself, PyObject *const *args, int offset,
1817 the offset parameter or do we need the wider width? */
1821 i = offset;
1824 char *res = buf + code->offset;
1936 "S.pack_into(buffer, offset, v1, v2, ...)\n\
1940 offset. Note that the offset is a required argument. See\n\
1948 Py_ssize_t offset;
1963 "pack_into expected offset argument");
1978 /* Extract the offset from the first argument */
1979 offset = PyNumber_AsSsize_t(args[1], PyExc_IndexError);
1980 if (offset == -1 && PyErr_Occurred()) {
1986 if (offset < 0) {
1987 /* Check that negative offset is low enough to fit data */
1988 if (offset + soself->s_size > 0) {
1990 "no space to pack %zd bytes at offset %zd",
1992 offset);
1997 /* Check that negative offset is not crossing buffer boundary */
1998 if (offset + buffer.len < 0) {
2000 "offset %zd out of range for %zd-byte buffer",
2001 offset,
2007 offset += buffer.len;
2011 if ((buffer.len - offset) < soself->s_size) {
2012 assert(offset >= 0);
2017 "packing %zd bytes at offset %zd "
2019 (size_t)soself->s_size + (size_t)offset,
2021 offset,
2028 if (s_pack_internal(soself, args, 2, (char*)buffer.buf + offset, state) != 0) {
2223 "pack_into(format, buffer, offset, v1, v2, ...)\n\
2226 the packed bytes into the writable buffer buf starting at offset. Note\n\
2227 that the offset is a required argument. See help(struct) for more\n\
2277 offset: Py_ssize_t = 0
2281 The buffer's size, minus offset, must be at least calcsize(format).
2288 Py_buffer *buffer, Py_ssize_t offset)
2291 return Struct_unpack_from_impl(s_object, buffer, offset);