X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelHighAPI%2FModelHighAPI.i;h=d1b418cbc7a9bd2e53a24066cc7a2e5982e94c30;hb=77ce6d35ac8d2f0fdaecb4f23e0870bf74e36103;hp=109d13bc6927db5b615d538b978d409844ee7529;hpb=ae3e12ab08ba2c98c74c9f4b93812faace2af798;p=modules%2Fshaper.git diff --git a/src/ModelHighAPI/ModelHighAPI.i b/src/ModelHighAPI/ModelHighAPI.i index 109d13bc6..d1b418cbc 100644 --- a/src/ModelHighAPI/ModelHighAPI.i +++ b/src/ModelHighAPI/ModelHighAPI.i @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2020 CEA/DEN, EDF R&D +// Copyright (C) 2014-2024 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -30,9 +30,15 @@ %{ #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)) %} @@ -52,6 +58,9 @@ // directors %feature("director") ModelHighAPI_Dumper; +// functions with named parameters +%feature("kwargs") setColor; + // renamed methods %rename(__print__) ModelHighAPI_Dumper::operator<<;