summaryrefslogtreecommitdiffstats
path: root/yql/essentials/udfs/common/python/bindings/py_iterator.h
blob: 29a9534a1d04e723785f4320793b30b618d0c176 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once

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

namespace NPython {

extern PyTypeObject PyIteratorType;
extern PyTypeObject PyPairIteratorType;

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

TPyObjectPtr ToPyIterator(
    const TPyCastContext::TPtr& castCtx,
    const NKikimr::NUdf::TType* keyType,
    const NKikimr::NUdf::TType* payloadType,
    const NKikimr::NUdf::TUnboxedValuePod& value);

} // namespace NPython