aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/udfs/common/python/bindings/py_callable.h
blob: 4ce79e1d7f423fc390fc73220d80cdd14bda49d7 (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 PyCallableType;

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

NKikimr::NUdf::TUnboxedValue FromPyCallable(
        const TPyCastContext::TPtr& castCtx,
        const NKikimr::NUdf::TType* type,
        PyObject* value);

void SetupCallableSettings(const TPyCastContext::TPtr& castCtx, PyObject* value);

} // namspace NPython