Salome HOME
updated copyright message
[modules/shaper.git] / src / ModelAPI / ModelAPI.i
index 969ed7fd599502a0237efcb34cb5de7690747eba..2e70d62c7bfc82de81bba0f7b1613811e14f9dbe 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2022  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 "ModelAPI_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))
 %}