Lines Matching refs:item
298 in struct module syntax. For standard C types, a single item is an integer.
299 For compound types, a single item is a tuple of integers. */
306 PyObject *item, *tmp;
308 Py_ssize_t nmemb; /* number of members in a single item */
352 item = PySequence_Fast_GET_ITEM(items, i);
353 if ((PyBytes_Check(item) || PyLong_Check(item) ||
354 PyFloat_Check(item)) && nmemb == 1) {
355 PyTuple_SET_ITEM(args, 2, item);
357 else if ((PyList_Check(item) || PyTuple_Check(item)) &&
358 PySequence_Length(item) == nmemb) {
360 tmp = PySequence_Fast_GET_ITEM(item, j);
395 pack_single(char *ptr, PyObject *item, const char *fmt, Py_ssize_t itemsize)
435 if ((PyBytes_Check(item) || PyLong_Check(item) ||
436 PyFloat_Check(item)) && nmemb == 1) {
437 PyTuple_SET_ITEM(args, 2, item);
439 else if ((PyList_Check(item) || PyTuple_Check(item)) &&
440 PySequence_Length(item) == nmemb) {
442 x = PySequence_Fast_GET_ITEM(item, i);
610 unpack_rec(PyObject *unpack_from, char *ptr, PyObject *mview, char *item,
622 memcpy(item, ptr, itemsize);
642 x = unpack_rec(unpack_from, nextptr, mview, item,
667 char *item = NULL;
708 item = PyMem_Malloc(base->itemsize);
709 if (item == NULL) {
714 mview = PyMemoryView_FromMemory(item, base->itemsize, PyBUF_WRITE);
718 lst = unpack_rec(unpack_from, base->buf, mview, item,
724 PyMem_XFree(item);
1894 /* rvalue must be a single item */
2302 /* Get a single item from bufobj at the location specified by seq.