Lines Matching refs:soself
1371 PyStructObject *soself = (PyStructObject *)self; in s_init() local
1384 Py_XSETREF(soself->s_format, o_format); in s_init()
1390 Py_XSETREF(soself->s_format, str); in s_init()
1399 ret = prepare_s(soself); in s_init()
1416 s_unpack_internal(PyStructObject *soself, char *startfrom) { in s_unpack_internal() argument
1419 PyObject *result = PyTuple_New(soself->s_len); in s_unpack_internal()
1423 for (code = soself->s_codes; code->fmtdef != NULL; code++) { in s_unpack_internal()
1463 PyStructObject *soself = (PyStructObject *)self; in s_unpack() local
1465 assert(soself->s_codes != NULL); in s_unpack()
1469 PyString_GET_SIZE(inputstr) == soself->s_size) { in s_unpack()
1470 return s_unpack_internal(soself, PyString_AS_STRING(inputstr)); in s_unpack()
1479 if (soself->s_size != len) { in s_unpack()
1483 result = s_unpack_internal(soself, start); in s_unpack()
1492 soself->s_size); in s_unpack()
1512 PyStructObject *soself = (PyStructObject *)self; in s_unpack_from() local
1515 assert(soself->s_codes != NULL); in s_unpack_from()
1532 if (offset < 0 || (buffer_len - offset) < soself->s_size) { in s_unpack_from()
1535 soself->s_size); in s_unpack_from()
1539 result = s_unpack_internal(soself, buffer + offset); in s_unpack_from()
1556 s_pack_internal(PyStructObject *soself, PyObject *args, int offset, char* buf) in s_pack_internal() argument
1563 memset(buf, '\0', soself->s_size); in s_pack_internal()
1565 for (code = soself->s_codes; code->fmtdef != NULL; code++) { in s_pack_internal()
1622 PyStructObject *soself; in s_pack() local
1626 soself = (PyStructObject *)self; in s_pack()
1628 assert(soself->s_codes != NULL); in s_pack()
1629 if (PyTuple_GET_SIZE(args) != soself->s_len) in s_pack()
1632 "pack expected %zd items for packing (got %zd)", soself->s_len, PyTuple_GET_SIZE(args)); in s_pack()
1637 result = PyString_FromStringAndSize((char *)NULL, soself->s_size); in s_pack()
1642 if ( s_pack_internal(soself, args, 0, PyString_AS_STRING(result)) != 0 ) { in s_pack()
1661 PyStructObject *soself; in s_pack_into() local
1666 soself = (PyStructObject *)self; in s_pack_into()
1668 assert(soself->s_codes != NULL); in s_pack_into()
1669 if (PyTuple_GET_SIZE(args) != (soself->s_len + 2)) in s_pack_into()
1682 soself->s_len, (PyTuple_GET_SIZE(args) - 2)); in s_pack_into()
1703 if (offset < 0 || (buf.len - offset) < soself->s_size) { in s_pack_into()
1706 soself->s_size); in s_pack_into()
1712 if (s_pack_internal(soself, args, 2, (char *)buf.buf + offset) != 0) { in s_pack_into()