aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/udfs/common/python/bindings/py_stream.h
blob: f677e23930d5a19b7499b01a860a8f343805f546 (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
#pragma once

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

namespace NPython {

extern PyTypeObject PyStreamType;
extern PyObject* PyYieldIterationException;

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

NKikimr::NUdf::TUnboxedValue FromPyStream(
        const TPyCastContext::TPtr& castCtx,
        const NKikimr::NUdf::TType* type,
        const TPyObjectPtr& value,
        const TPyObjectPtr& originalCallable,
        const TPyObjectPtr& originalCallableClosure,
        const TPyObjectPtr& originalCallableArgs);

} // namespace NPython