Lines Matching refs:lz
543 filterobject *lz; in filter_new() local
557 lz = (filterobject *)type->tp_alloc(type, 0); in filter_new()
558 if (lz == NULL) { in filter_new()
563 lz->func = func; in filter_new()
564 lz->it = it; in filter_new()
566 return (PyObject *)lz; in filter_new()
570 filter_dealloc(filterobject *lz) in filter_dealloc() argument
572 PyObject_GC_UnTrack(lz); in filter_dealloc()
573 Py_XDECREF(lz->func); in filter_dealloc()
574 Py_XDECREF(lz->it); in filter_dealloc()
575 Py_TYPE(lz)->tp_free(lz); in filter_dealloc()
579 filter_traverse(filterobject *lz, visitproc visit, void *arg) in filter_traverse() argument
581 Py_VISIT(lz->it); in filter_traverse()
582 Py_VISIT(lz->func); in filter_traverse()
587 filter_next(filterobject *lz) in filter_next() argument
590 PyObject *it = lz->it; in filter_next()
593 int checktrue = lz->func == Py_None || lz->func == (PyObject *)&PyBool_Type; in filter_next()
605 good = PyObject_CallFunctionObjArgs(lz->func, item, NULL); in filter_next()
622 filter_reduce(filterobject *lz) in filter_reduce() argument
624 return Py_BuildValue("O(OO)", Py_TYPE(lz), lz->func, lz->it); in filter_reduce()
1232 mapobject *lz; in map_new() local
1260 lz = (mapobject *)type->tp_alloc(type, 0); in map_new()
1261 if (lz == NULL) { in map_new()
1265 lz->iters = iters; in map_new()
1268 lz->func = func; in map_new()
1270 return (PyObject *)lz; in map_new()
1274 map_dealloc(mapobject *lz) in map_dealloc() argument
1276 PyObject_GC_UnTrack(lz); in map_dealloc()
1277 Py_XDECREF(lz->iters); in map_dealloc()
1278 Py_XDECREF(lz->func); in map_dealloc()
1279 Py_TYPE(lz)->tp_free(lz); in map_dealloc()
1283 map_traverse(mapobject *lz, visitproc visit, void *arg) in map_traverse() argument
1285 Py_VISIT(lz->iters); in map_traverse()
1286 Py_VISIT(lz->func); in map_traverse()
1291 map_next(mapobject *lz) in map_next() argument
1298 niters = PyTuple_GET_SIZE(lz->iters); in map_next()
1312 PyObject *it = PyTuple_GET_ITEM(lz->iters, i); in map_next()
1321 result = _PyObject_FastCall(lz->func, stack, nargs); in map_next()
1334 map_reduce(mapobject *lz) in map_reduce() argument
1336 Py_ssize_t numargs = PyTuple_GET_SIZE(lz->iters); in map_reduce()
1341 Py_INCREF(lz->func); in map_reduce()
1342 PyTuple_SET_ITEM(args, 0, lz->func); in map_reduce()
1344 PyObject *it = PyTuple_GET_ITEM(lz->iters, i); in map_reduce()
1349 return Py_BuildValue("ON", Py_TYPE(lz), args); in map_reduce()
2548 zipobject *lz; in zip_new() local
2591 lz = (zipobject *)type->tp_alloc(type, 0); in zip_new()
2592 if (lz == NULL) { in zip_new()
2597 lz->ittuple = ittuple; in zip_new()
2598 lz->tuplesize = tuplesize; in zip_new()
2599 lz->result = result; in zip_new()
2601 return (PyObject *)lz; in zip_new()
2605 zip_dealloc(zipobject *lz) in zip_dealloc() argument
2607 PyObject_GC_UnTrack(lz); in zip_dealloc()
2608 Py_XDECREF(lz->ittuple); in zip_dealloc()
2609 Py_XDECREF(lz->result); in zip_dealloc()
2610 Py_TYPE(lz)->tp_free(lz); in zip_dealloc()
2614 zip_traverse(zipobject *lz, visitproc visit, void *arg) in zip_traverse() argument
2616 Py_VISIT(lz->ittuple); in zip_traverse()
2617 Py_VISIT(lz->result); in zip_traverse()
2622 zip_next(zipobject *lz) in zip_next() argument
2625 Py_ssize_t tuplesize = lz->tuplesize; in zip_next()
2626 PyObject *result = lz->result; in zip_next()
2636 it = PyTuple_GET_ITEM(lz->ittuple, i); in zip_next()
2651 it = PyTuple_GET_ITEM(lz->ittuple, i); in zip_next()
2664 zip_reduce(zipobject *lz) in zip_reduce() argument
2667 return Py_BuildValue("OO", Py_TYPE(lz), lz->ittuple); in zip_reduce()