From b02c1d80d4bb7ccb2036a4af97f98eb919cc758c Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Wed, 20 Feb 2019 11:22:50 -0800 Subject: [PATCH] Fix an SAL annotation in the C API --- include/onnxruntime/core/session/onnxruntime_c_api.h | 2 +- onnxruntime/core/session/onnxruntime_c_api.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/onnxruntime/core/session/onnxruntime_c_api.h b/include/onnxruntime/core/session/onnxruntime_c_api.h index 3298c04b22..25dbb4fd26 100644 --- a/include/onnxruntime/core/session/onnxruntime_c_api.h +++ b/include/onnxruntime/core/session/onnxruntime_c_api.h @@ -284,7 +284,7 @@ ORT_API_STATUS(OrtCreateTensorAsOrtValue, _Inout_ OrtAllocator* allocator, * \param out Should be freed by calling OrtReleaseValue */ ORT_API_STATUS(OrtCreateTensorWithDataAsOrtValue, _In_ const OrtAllocatorInfo* info, - _In_ void* p_data, size_t p_data_len, _In_ const size_t* shape, size_t shape_len, + _Inout_ void* p_data, size_t p_data_len, _In_ const size_t* shape, size_t shape_len, ONNXTensorElementDataType type, _Out_ OrtValue** out); // This function doesn't work with string tensor diff --git a/onnxruntime/core/session/onnxruntime_c_api.cc b/onnxruntime/core/session/onnxruntime_c_api.cc index 69f3e28c03..7ed9af441d 100644 --- a/onnxruntime/core/session/onnxruntime_c_api.cc +++ b/onnxruntime/core/session/onnxruntime_c_api.cc @@ -222,7 +222,7 @@ OrtStatus* CreateTensorImpl(const size_t* shape, size_t shape_len, const OrtAllo * this function will create a copy of the allocator info */ ORT_API_STATUS_IMPL(OrtCreateTensorWithDataAsOrtValue, _In_ const OrtAllocatorInfo* info, - _In_ void* p_data, size_t p_data_len, _In_ const size_t* shape, size_t shape_len, + _Inout_ void* p_data, size_t p_data_len, _In_ const size_t* shape, size_t shape_len, ONNXTensorElementDataType type, _Out_ OrtValue** out) { API_IMPL_BEGIN std::unique_ptr tensor;