Propagate const char* filename for codes/grib_index_new_from_file.

Propagate const char* value for codes/grib_index_select_string.
This commit is contained in:
CaptainCarrot 2020-07-11 07:58:00 +02:00
parent 7a618fa90a
commit c4ad1a36ed
5 changed files with 10 additions and 10 deletions

View File

@ -96,7 +96,7 @@ int codes_fieldset_count(grib_fieldset* set)
/* Indexing */ /* Indexing */
/******************************************************************************/ /******************************************************************************/
grib_index* codes_index_new_from_file(grib_context* c, char* filename, const char* keys, int* err) grib_index* codes_index_new_from_file(grib_context* c, const char* filename, const char* keys, int* err)
{ {
return grib_index_new_from_file(c, filename, keys, err); return grib_index_new_from_file(c, filename, keys, err);
} }
@ -140,7 +140,7 @@ int codes_index_select_double(grib_index* index, const char* key, double value)
{ {
return grib_index_select_double(index, key, value); return grib_index_select_double(index, key, value);
} }
int codes_index_select_string(grib_index* index, const char* key, char* value) int codes_index_select_string(grib_index* index, const char* key, const char* value)
{ {
return grib_index_select_string(index, key, value); return grib_index_select_string(index, key, value);
} }

View File

@ -214,7 +214,7 @@ typedef struct grib_index codes_index;
* @param err : 0 if OK, integer value on error * @param err : 0 if OK, integer value on error
* @return the newly created index * @return the newly created index
*/ */
codes_index* codes_index_new_from_file(codes_context* c, char* filename, const char* keys, int* err); codes_index* codes_index_new_from_file(codes_context* c, const char* filename, const char* keys, int* err);
/** /**
* Create a new index based on a set of keys. * Create a new index based on a set of keys.
@ -320,7 +320,7 @@ int codes_index_select_double(codes_index* index, const char* key, double value)
* @param value : value of the key to select * @param value : value of the key to select
* @return 0 if OK, integer value on error * @return 0 if OK, integer value on error
*/ */
int codes_index_select_string(codes_index* index, const char* key, char* value); int codes_index_select_string(codes_index* index, const char* key, const char* value);
/** /**
* Create a new handle from an index after having selected the key values. * Create a new handle from an index after having selected the key values.

View File

@ -266,7 +266,7 @@ typedef struct grib_index grib_index;
* @return the newly created index * @return the newly created index
*/ */
grib_index* grib_index_new_from_file(grib_context* c, grib_index* grib_index_new_from_file(grib_context* c,
char* filename, const char* keys, int* err); const char* filename, const char* keys, int* err);
/** /**
* Create a new index based on a set of keys. * Create a new index based on a set of keys.
* *
@ -374,7 +374,7 @@ int grib_index_select_double(grib_index* index, const char* key, double value);
* @param value : value of the key to select * @param value : value of the key to select
* @return 0 if OK, integer value on error * @return 0 if OK, integer value on error
*/ */
int grib_index_select_string(grib_index* index, const char* key, char* value); int grib_index_select_string(grib_index* index, const char* key, const char* value);
/** /**
* Create a new handle from an index after having selected the key values. * Create a new handle from an index after having selected the key values.

View File

@ -731,14 +731,14 @@ int grib_index_add_file(grib_index* index, const char* filename);
grib_handle* new_message_from_file(int message_type, grib_context* c, FILE* f, int* error); grib_handle* new_message_from_file(int message_type, grib_context* c, FILE* f, int* error);
int _codes_index_add_file(grib_index* index, const char* filename, int message_type); int _codes_index_add_file(grib_index* index, const char* filename, int message_type);
int grib_index_add_file(grib_index* index, const char* filename); int grib_index_add_file(grib_index* index, const char* filename);
grib_index* grib_index_new_from_file(grib_context* c, char* filename, const char* keys, int* err); grib_index* grib_index_new_from_file(grib_context* c, const char* filename, const char* keys, int* err);
int grib_index_get_size(const grib_index* index, const char* key, size_t* size); int grib_index_get_size(const grib_index* index, const char* key, size_t* size);
int grib_index_get_string(const grib_index* index, const char* key, char** values, size_t* size); int grib_index_get_string(const grib_index* index, const char* key, char** values, size_t* size);
int grib_index_get_long(const grib_index* index, const char* key, long* values, size_t* size); int grib_index_get_long(const grib_index* index, const char* key, long* values, size_t* size);
int grib_index_get_double(const grib_index* index, const char* key, double* values, size_t* size); int grib_index_get_double(const grib_index* index, const char* key, double* values, size_t* size);
int grib_index_select_long(grib_index* index, const char* skey, long value); int grib_index_select_long(grib_index* index, const char* skey, long value);
int grib_index_select_double(grib_index* index, const char* skey, double value); int grib_index_select_double(grib_index* index, const char* skey, double value);
int grib_index_select_string(grib_index* index, const char* skey, char* value); int grib_index_select_string(grib_index* index, const char* skey, const char* value);
grib_handle* grib_index_get_handle(grib_field* field, int* err); grib_handle* grib_index_get_handle(grib_field* field, int* err);
grib_handle* codes_index_get_handle(grib_field* field, int message_type, int* err); grib_handle* codes_index_get_handle(grib_field* field, int message_type, int* err);
int grib_index_dump_file(FILE* fout, const char* filename); int grib_index_dump_file(FILE* fout, const char* filename);

View File

@ -1400,7 +1400,7 @@ int grib_index_add_file(grib_index* index, const char* filename)
} }
#endif #endif
grib_index* grib_index_new_from_file(grib_context* c, char* filename, const char* keys, int* err) grib_index* grib_index_new_from_file(grib_context* c, const char* filename, const char* keys, int* err)
{ {
grib_index* index = NULL; grib_index* index = NULL;
@ -1576,7 +1576,7 @@ int grib_index_select_double(grib_index* index, const char* skey, double value)
return 0; return 0;
} }
int grib_index_select_string(grib_index* index, const char* skey, char* value) int grib_index_select_string(grib_index* index, const char* skey, const char* value)
{ {
grib_index_key* key = NULL; grib_index_key* key = NULL;
int err = GRIB_NOT_FOUND; int err = GRIB_NOT_FOUND;