Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MPI_Address gets const too.
[simgrid.git] / src / smpi / bindings / smpi_pmpi.cpp
index cbddb4d..b4a47dd 100644 (file)
@@ -142,7 +142,7 @@ double PMPI_Wtick()
   return sg_maxmin_precision;
 }
 
-int PMPI_Address(void *location, MPI_Aint * address)
+int PMPI_Address(const void* location, MPI_Aint* address)
 {
   if (address==nullptr) {
     return MPI_ERR_ARG;
@@ -154,7 +154,7 @@ int PMPI_Address(void *location, MPI_Aint * address)
 
 int PMPI_Get_address(const void *location, MPI_Aint * address)
 {
-  return PMPI_Address(const_cast<void*>(location), address);
+  return PMPI_Address(location, address);
 }
 
 int PMPI_Get_processor_name(char *name, int *resultlen)