X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d656f9465e7b1c36319f86eeafdcec58fe9551a4..385f6d5ce3f2aff9707045601b32a66b017d7bed:/src/smpi/bindings/smpi_pmpi_info.cpp diff --git a/src/smpi/bindings/smpi_pmpi_info.cpp b/src/smpi/bindings/smpi_pmpi_info.cpp index ed0c2b3c56..ca08ebf6e5 100644 --- a/src/smpi/bindings/smpi_pmpi_info.cpp +++ b/src/smpi/bindings/smpi_pmpi_info.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2019. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -9,7 +9,6 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi); /* PMPI User level calls */ -extern "C" { // Obviously, the C MPI interface should use the C linkage int PMPI_Info_create( MPI_Info *info){ if (info == nullptr) @@ -18,7 +17,7 @@ int PMPI_Info_create( MPI_Info *info){ return MPI_SUCCESS; } -int PMPI_Info_set( MPI_Info info, char *key, char *value){ +int PMPI_Info_set( MPI_Info info, const char *key, const char *value){ if (info == nullptr || key == nullptr || value == nullptr) return MPI_ERR_ARG; info->set(key, value); @@ -33,7 +32,7 @@ int PMPI_Info_free( MPI_Info *info){ return MPI_SUCCESS; } -int PMPI_Info_get(MPI_Info info,char *key,int valuelen, char *value, int *flag){ +int PMPI_Info_get(MPI_Info info, const char *key,int valuelen, char *value, int *flag){ *flag=false; if (info == nullptr || key == nullptr || valuelen <0) return MPI_ERR_ARG; @@ -49,7 +48,7 @@ int PMPI_Info_dup(MPI_Info info, MPI_Info *newinfo){ return MPI_SUCCESS; } -int PMPI_Info_delete(MPI_Info info, char *key){ +int PMPI_Info_delete(MPI_Info info, const char *key){ if (info == nullptr || key==nullptr) return MPI_ERR_ARG; return info->remove(key); @@ -67,7 +66,7 @@ int PMPI_Info_get_nthkey( MPI_Info info, int n, char *key){ return info->get_nthkey(n, key); } -int PMPI_Info_get_valuelen( MPI_Info info, char *key, int *valuelen, int *flag){ +int PMPI_Info_get_valuelen( MPI_Info info, const char *key, int *valuelen, int *flag){ *flag=false; if (info == nullptr || key == nullptr || valuelen==nullptr) return MPI_ERR_ARG; @@ -81,5 +80,3 @@ MPI_Info PMPI_Info_f2c(MPI_Fint info){ MPI_Fint PMPI_Info_c2f(MPI_Info info){ return info->c2f(); } - -}