Salome HOME
Copyright update 2022
[modules/yacs.git] / src / evalyfx / YACSEvalSeqAny.cxx
index 43f3fad2d34b20d9e5f8fb4c4e774c649203a425..5b7a428530a7fa442ae9ed44568d43ebe3527c48 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2012-2015  CEA/DEN, EDF R&D
+// Copyright (C) 2012-2022  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
@@ -15,7 +15,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-// 
+//
 // Author : Anthony Geay (EDF R&D)
 
 #include "YACSEvalSeqAny.hxx"
@@ -34,14 +34,6 @@ YACSEvalSeqAny *YACSEvalSeqAny::BuildEmptyFromType(const std::string& dataType)
     throw YACS::Exception("YACSEvalSeqAny::BuildEmptyFromType : Only int and double are actualy managed !");
 }
 
-template<class T>
-std::size_t YACSEvalSeqAnyInternal<T>::size() const
-{
-  if(!_arr)
-    throw YACS::Exception("YACSEvalSeqAnyDouble<T>::size : empty array !");
-  return _arr->size();
-}
-
 YACSEvalSeqAnyDouble::YACSEvalSeqAnyDouble(const std::vector<double>& arr):_arr(0)
 {
   std::vector<double> *zeArr(new std::vector<double>(arr));
@@ -120,7 +112,7 @@ void YACSEvalSeqAnyInt::initialize(YACS::ENGINE::InputPyPort *p) const
   PyObject *ob(PyList_New(sz));
   for(std::size_t i=0;i<sz;i++)
     {
-      PyList_SetItem(ob,i,PyInt_FromLong((*_arr)[i]));
+      PyList_SetItem(ob,i,PyLong_FromLong((*_arr)[i]));
     }
   p->put(ob);
   p->exSaveInit();