# HG changeset patch # User Sebastien Jodogne # Date 1695313105 -7200 # Node ID 0e5e675b975026b19ec78d7c94f4c1cd3261e15f # Parent c026301eee9e15c3f62cb194c6584f7b6153ebf8 replaced "int" by "int32_t" in the SDK to prevent any ABI issue diff -r c026301eee9e -r 0e5e675b9750 OrthancServer/Plugins/Engine/OrthancPlugins.cpp --- a/OrthancServer/Plugins/Engine/OrthancPlugins.cpp Wed Sep 20 09:02:31 2023 +0200 +++ b/OrthancServer/Plugins/Engine/OrthancPlugins.cpp Thu Sep 21 18:18:25 2023 +0200 @@ -2038,7 +2038,8 @@ OrthancPlugins::OrthancPlugins(const std::string& databaseServerIdentifier) { /* Sanity check of the compiler */ - if (sizeof(int32_t) != sizeof(OrthancPluginErrorCode) || + if (sizeof(int32_t) != sizeof(int) || // Ensure binary compatibility with Orthanc SDK <= 1.12.1 + sizeof(int32_t) != sizeof(OrthancPluginErrorCode) || sizeof(int32_t) != sizeof(OrthancPluginHttpMethod) || sizeof(int32_t) != sizeof(_OrthancPluginService) || sizeof(int32_t) != sizeof(_OrthancPluginProperty) || diff -r c026301eee9e -r 0e5e675b9750 OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h --- a/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h Wed Sep 20 09:02:31 2023 +0200 +++ b/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h Thu Sep 21 18:18:25 2023 +0200 @@ -1903,15 +1903,16 @@ * @see OrthancPluginCheckVersion() * @ingroup Callbacks **/ - ORTHANC_PLUGIN_INLINE int OrthancPluginCheckVersionAdvanced( + ORTHANC_PLUGIN_INLINE int32_t OrthancPluginCheckVersionAdvanced( OrthancPluginContext* context, - int expectedMajor, - int expectedMinor, - int expectedRevision) - { - int major, minor, revision; - - if (sizeof(int32_t) != sizeof(OrthancPluginErrorCode) || + int32_t expectedMajor, + int32_t expectedMinor, + int32_t expectedRevision) + { + int32_t major, minor, revision; + + if (sizeof(int) != sizeof(int32_t) || /* Ensure binary compatibility with Orthanc SDK <= 1.12.1 */ + sizeof(int32_t) != sizeof(OrthancPluginErrorCode) || sizeof(int32_t) != sizeof(OrthancPluginHttpMethod) || sizeof(int32_t) != sizeof(_OrthancPluginService) || sizeof(int32_t) != sizeof(_OrthancPluginProperty) || @@ -2009,7 +2010,7 @@ * @see OrthancPluginCheckVersionAdvanced() * @ingroup Callbacks **/ - ORTHANC_PLUGIN_INLINE int OrthancPluginCheckVersion( + ORTHANC_PLUGIN_INLINE int32_t OrthancPluginCheckVersion( OrthancPluginContext* context) { return OrthancPluginCheckVersionAdvanced( @@ -3151,7 +3152,7 @@ * @return 1 if the metadata is present, 0 if it is absent, -1 in case of error. * @ingroup DicomInstance **/ - ORTHANC_PLUGIN_INLINE int OrthancPluginHasInstanceMetadata( + ORTHANC_PLUGIN_INLINE int32_t OrthancPluginHasInstanceMetadata( OrthancPluginContext* context, const OrthancPluginDicomInstance* instance, const char* metadata) @@ -6921,7 +6922,7 @@ { char** resultId; OrthancPluginJob *job; - int priority; + int32_t priority; } _OrthancPluginSubmitJob; /** @@ -6940,7 +6941,7 @@ ORTHANC_PLUGIN_INLINE char *OrthancPluginSubmitJob( OrthancPluginContext *context, OrthancPluginJob *job, - int priority) + int32_t priority) { char* resultId = NULL;