diff --git a/onnxruntime/core/session/custom_ops.cc b/onnxruntime/core/session/custom_ops.cc index 165bb13ecd..a821a718de 100644 --- a/onnxruntime/core/session/custom_ops.cc +++ b/onnxruntime/core/session/custom_ops.cc @@ -29,11 +29,11 @@ ORT_API_STATUS_IMPL(OrtKernelInfoGetAttribute_int64, _In_ const OrtKernelInfo* i return onnxruntime::ToOrtStatus(status); } -OrtValue* OrtKernelContext_GetInput(OrtKernelContext* context, _In_ size_t index) { +ORT_API(OrtValue*, OrtKernelContext_GetInput, OrtKernelContext* context, _In_ size_t index) { return reinterpret_cast(const_cast(reinterpret_cast(context)->GetInputMLValue(index))); }; -OrtValue* OrtKernelContext_GetOutput(OrtKernelContext* context, _In_ size_t index, _In_ const int64_t* dim_values, size_t dim_count) { +ORT_API(OrtValue*, OrtKernelContext_GetOutput, OrtKernelContext* context, _In_ size_t index, _In_ const int64_t* dim_values, size_t dim_count) { onnxruntime::TensorShape shape(dim_values, dim_count); return reinterpret_cast(reinterpret_cast(context)->OutputMLValue(index, shape)); };