#pragma once #include "py_ptr.h" #include "py_ctx.h" #include namespace NPython { template TPyObjectPtr PyCast(typename TTypeTraits::TFuncParam value); template T PyCast(PyObject* value); template bool TryPyCast(PyObject* value, T& result); template TPyObjectPtr ToPyUnicode(const T& value); TPyObjectPtr ToPyObject( const TPyCastContext::TPtr& ctx, const NKikimr::NUdf::TType* type, const NKikimr::NUdf::TUnboxedValuePod& value); NKikimr::NUdf::TUnboxedValue FromPyObject( const TPyCastContext::TPtr& ctx, const NKikimr::NUdf::TType* type, PyObject* value); TPyObjectPtr ToPyArgs( const TPyCastContext::TPtr& ctx, const NKikimr::NUdf::TType* type, const NKikimr::NUdf::TUnboxedValuePod* args, const NKikimr::NUdf::TCallableTypeInspector& inspector); void FromPyArgs( const TPyCastContext::TPtr& ctx, const NKikimr::NUdf::TType* type, PyObject* pyArgs, NKikimr::NUdf::TUnboxedValue* cArgs, const NKikimr::NUdf::TCallableTypeInspector& inspector); } // namspace NPython