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

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

namespace NPython {

extern const char ResourceCapsuleName[];

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

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

} // namspace NPython