summaryrefslogtreecommitdiffstats
path: root/yql/essentials/udfs/common/python/bindings/py_list.h
blob: 9266ff918f5843c21ff124d4c79c15b4c1aaf6d2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once

#include "py_ptr.h"
#include "py_ctx.h"

namespace NPython {

extern PyTypeObject PyLazyListIteratorType;
extern PyTypeObject PyLazyListType;
extern PyTypeObject PyThinListIteratorType;
extern PyTypeObject PyThinListType;

TPyObjectPtr ToPyLazyList(
    const TPyCastContext::TPtr& castCtx,
    const NKikimr::NUdf::TType* itemType,
    const NKikimr::NUdf::TUnboxedValuePod& value);

NKikimr::NUdf::TUnboxedValue FromPyLazyGenerator(
    const TPyCastContext::TPtr& castCtx,
    const NKikimr::NUdf::TType* type,
    TPyObjectPtr callableObj);

NKikimr::NUdf::TUnboxedValue FromPyLazyIterable(
    const TPyCastContext::TPtr& castCtx,
    const NKikimr::NUdf::TType* type,
    TPyObjectPtr iterableObj);

NKikimr::NUdf::TUnboxedValue FromPyLazyIterator(
    const TPyCastContext::TPtr& castCtx,
    const NKikimr::NUdf::TType* type,
    TPyObjectPtr iteratorObj);

} // namespace NPython