Mercurial > hg > orthanc-python
comparison Resources/OrthancCPlugin-1.10.0.patch @ 142:6288b8132659
replaced "int" by "int32_t" in the SDK to prevent any ABI issue
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 21 Sep 2023 18:18:51 +0200 |
parents | |
children | d63c58d650ff |
comparison
equal
deleted
inserted
replaced
141:3867cb23991d | 142:6288b8132659 |
---|---|
1 --- OrthancCPlugin.h.orig 2023-09-21 18:02:41.830746493 +0200 | |
2 +++ OrthancCPlugin.h 2023-09-21 18:04:07.977591228 +0200 | |
3 @@ -1829,15 +1829,16 @@ | |
4 * @see OrthancPluginCheckVersion | |
5 * @ingroup Callbacks | |
6 **/ | |
7 - ORTHANC_PLUGIN_INLINE int OrthancPluginCheckVersionAdvanced( | |
8 + ORTHANC_PLUGIN_INLINE int32_t OrthancPluginCheckVersionAdvanced( | |
9 OrthancPluginContext* context, | |
10 - int expectedMajor, | |
11 - int expectedMinor, | |
12 - int expectedRevision) | |
13 + int32_t expectedMajor, | |
14 + int32_t expectedMinor, | |
15 + int32_t expectedRevision) | |
16 { | |
17 - int major, minor, revision; | |
18 + int32_t major, minor, revision; | |
19 | |
20 - if (sizeof(int32_t) != sizeof(OrthancPluginErrorCode) || | |
21 + if (sizeof(int) != sizeof(int32_t) || /* Ensure binary compatibility with Orthanc SDK <= 1.12.1 */ | |
22 + sizeof(int32_t) != sizeof(OrthancPluginErrorCode) || | |
23 sizeof(int32_t) != sizeof(OrthancPluginHttpMethod) || | |
24 sizeof(int32_t) != sizeof(_OrthancPluginService) || | |
25 sizeof(int32_t) != sizeof(_OrthancPluginProperty) || | |
26 @@ -1935,7 +1936,7 @@ | |
27 * @see OrthancPluginCheckVersionAdvanced | |
28 * @ingroup Callbacks | |
29 **/ | |
30 - ORTHANC_PLUGIN_INLINE int OrthancPluginCheckVersion( | |
31 + ORTHANC_PLUGIN_INLINE int32_t OrthancPluginCheckVersion( | |
32 OrthancPluginContext* context) | |
33 { | |
34 return OrthancPluginCheckVersionAdvanced( | |
35 @@ -3077,7 +3078,7 @@ | |
36 * @return 1 if the metadata is present, 0 if it is absent, -1 in case of error. | |
37 * @ingroup DicomInstance | |
38 **/ | |
39 - ORTHANC_PLUGIN_INLINE int OrthancPluginHasInstanceMetadata( | |
40 + ORTHANC_PLUGIN_INLINE int32_t OrthancPluginHasInstanceMetadata( | |
41 OrthancPluginContext* context, | |
42 const OrthancPluginDicomInstance* instance, | |
43 const char* metadata) | |
44 @@ -3856,13 +3857,13 @@ | |
45 OrthancPluginContext* context, | |
46 OrthancPluginRestOutput* output, | |
47 uint16_t status, | |
48 - const char* body, | |
49 + const void* body, | |
50 uint32_t bodySize) | |
51 { | |
52 _OrthancPluginSendHttpStatus params; | |
53 params.output = output; | |
54 params.status = status; | |
55 - params.body = body; | |
56 + params.body = reinterpret_cast<const char*>(body); | |
57 params.bodySize = bodySize; | |
58 context->InvokeService(context, _OrthancPluginService_SendHttpStatus, ¶ms); | |
59 } | |
60 @@ -6760,7 +6761,7 @@ | |
61 { | |
62 char** resultId; | |
63 OrthancPluginJob *job; | |
64 - int priority; | |
65 + int32_t priority; | |
66 } _OrthancPluginSubmitJob; | |
67 | |
68 /** | |
69 @@ -6779,7 +6780,7 @@ | |
70 ORTHANC_PLUGIN_INLINE char *OrthancPluginSubmitJob( | |
71 OrthancPluginContext *context, | |
72 OrthancPluginJob *job, | |
73 - int priority) | |
74 + int32_t priority) | |
75 { | |
76 char* resultId = NULL; | |
77 |