Salome HOME
RNV: Porting to swig-3
[tools/medcoupling.git] / src / MEDLoader / Swig / MEDLoaderTypemaps.i
index 9e49e474f35e9c6084932c52cbfc943f9df5ddc1..9df1cb801a82838371eeb58baf06ea15a9cdad2a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2016  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
@@ -197,6 +197,20 @@ static PyObject *convertFieldDoubleVecToPy(const std::vector<MEDCoupling::MEDCou
   return ret;
 }
 
+PyObject *convertVecPairIntToPy(const std::vector< std::pair<int,int> >& vec)
+{
+  PyObject *ret(PyList_New(vec.size()));
+  int rk=0;
+  for(std::vector< std::pair<int,int> >::const_iterator iter=vec.begin();iter!=vec.end();iter++,rk++)
+    {
+      PyObject *elt=PyTuple_New(2);
+      PyTuple_SetItem(elt,0,SWIG_From_int((*iter).first));
+      PyTuple_SetItem(elt,1,SWIG_From_int((*iter).second));
+      PyList_SetItem(ret,rk,elt);
+    }
+  return ret;
+}
+
 PyObject *convertVecPairVecStToPy(const std::vector< std::pair<std::vector<std::string>, std::string > >& vec)
 {
   int sz=(int)vec.size();