Salome HOME
updated copyright message
[modules/shaper.git] / src / ModelHighAPI / ModelHighAPI.i
index 82af134c6378ee441b0e43d4b1c47d380dca7d8e..9f1b1a2e96cd7e014c15c0f394c990173b5ab6d5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2021  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 %{
   #include "ModelHighAPI_swig.h"
 
-  // fix for SWIG v2.0.4
-  #define SWIGPY_SLICE_ARG(obj) ((PyObject*)(obj))
+  // fix for SWIG v4.1.1
+  #if PY_VERSION_HEX >= 0x03020000
+  # define SWIGPY_SLICEOBJECT PyObject
+  #else
+  # define SWIGPY_SLICEOBJECT PySliceObject
+  #endif
 
+  // fix for SWIG v2.0.4
+  #define SWIGPY_SLICE_ARG(obj)   ((SWIGPY_SLICEOBJECT*)(obj))
   #define SWIGPY_UNICODE_ARG(obj) ((PyObject*) (obj))
 %}