Salome HOME
Move MEDFileUMesh::addGroup to MEDFileMesh level -> addGroup is now available in...
[tools/medcoupling.git] / src / MEDLoader / Swig / MEDLoaderTypemaps.i
index 96ad8994e0a43f56c06cd909dfcc78f405f97f1a..5a415a6857b915e91902d17325a1df11cbc8548a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2015  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -310,7 +310,7 @@ int MEDFileAnyTypeFieldMultiTSgetitemSingleTS__(const MEDFileAnyTypeFieldMultiTS
 {
   if(elt0 && PyInt_Check(elt0))
     {//fmts[3]
-      return PyInt_AS_LONG(elt0);
+      return InterpreteNegativeInt(PyInt_AS_LONG(elt0),self->getNumberOfTS());
     }
   else if(elt0 && PyTuple_Check(elt0))
     {
@@ -347,7 +347,7 @@ int MEDFileFieldsgetitemSingleTS__(const MEDFileFields *self, PyObject *obj) thr
 {
   if(PyInt_Check(obj))
     {
-      return (int)PyInt_AS_LONG(obj);
+      return InterpreteNegativeInt((int)PyInt_AS_LONG(obj),self->getNumberOfFields());
     }
   else if(PyString_Check(obj))
     {