From: emmanuelattia-philips <66060489+emmanuelattia-philips@users.noreply.github.com> Date: Sun, 31 May 2020 20:19:37 +0000 (+0200) Subject: Ie capi callback with explicit calling convention (#697) X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7ec63cafe3cfcde33566fae17cd27b62b52e9878;p=platform%2Fupstream%2Fdldt.git Ie capi callback with explicit calling convention (#697) * Added explicit calling convention to CAPI callback * Fixed typo spacing * Renamed INFERENCE_ENGINE_CALLBACK to INFERENCE_ENGINE_C_API_CALLBAC to make the macro really specific to the C API --- diff --git a/inference-engine/ie_bridges/c/include/c_api/ie_c_api.h b/inference-engine/ie_bridges/c/include/c_api/ie_c_api.h index 4299639..f124978 100644 --- a/inference-engine/ie_bridges/c/include/c_api/ie_c_api.h +++ b/inference-engine/ie_bridges/c/include/c_api/ie_c_api.h @@ -31,6 +31,7 @@ #define IE_NODISCARD #else #if defined(_WIN32) + #define INFERENCE_ENGINE_C_API_CALLBACK __cdecl #ifdef inference_engine_c_api_EXPORTS #define INFERENCE_ENGINE_C_API(...) INFERENCE_ENGINE_C_API_EXTERN __declspec(dllexport) __VA_ARGS__ __cdecl #else @@ -43,6 +44,10 @@ #endif #endif +#ifndef INFERENCE_ENGINE_C_API_CALLBACK +#define INFERENCE_ENGINE_C_API_CALLBACK +#endif + typedef struct ie_core ie_core_t; typedef struct ie_network ie_network_t; typedef struct ie_executable ie_executable_network_t; @@ -284,7 +289,7 @@ typedef struct ie_blob_buffer { * @brief Completion callback definition about the function and args */ typedef struct ie_complete_call_back { - void (*completeCallBackFunc)(void *args); + void (INFERENCE_ENGINE_C_API_CALLBACK *completeCallBackFunc)(void *args); void *args; }ie_complete_call_back_t;