changeset 154:802d744d54d3

fix deprecated calls
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 16 Mar 2024 11:57:55 +0100
parents c78ec45f3695
children 71d305c29cfa
files CMakeLists.txt Sources/Plugin.cpp
diffstat 2 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/CMakeLists.txt	Sat Mar 16 11:55:27 2024 +0100
+++ b/CMakeLists.txt	Sat Mar 16 11:57:55 2024 +0100
@@ -198,7 +198,10 @@
 
 target_link_libraries(OrthancPython ${PYTHON_LIBRARIES})
 
-add_definitions(-DPLUGIN_VERSION="${PLUGIN_VERSION}")
+add_definitions(
+  -DPLUGIN_NAME="python"
+  -DPLUGIN_VERSION="${PLUGIN_VERSION}"
+  )
 
 set_target_properties(OrthancPython PROPERTIES 
   VERSION ${PLUGIN_VERSION} 
--- a/Sources/Plugin.cpp	Sat Mar 16 11:55:27 2024 +0100
+++ b/Sources/Plugin.cpp	Sat Mar 16 11:57:55 2024 +0100
@@ -537,7 +537,7 @@
       return -1;
     }
     
-    OrthancPluginSetDescription(c, "Run Python scripts as Orthanc plugins");
+    OrthancPlugins::SetDescription(PLUGIN_NAME, "Run Python scripts as Orthanc plugins");
     
     try
     {
@@ -672,7 +672,7 @@
 
   ORTHANC_PLUGINS_API const char* OrthancPluginGetName()
   {
-    return "python";
+    return PLUGIN_NAME;
   }