A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
API cleanup: s/dict_insert/dict_set/ and s/dict_retrieve/dict_get/ for consistency...
[simgrid.git]
/
src
/
xbt
/
dict_elm.c
diff --git
a/src/xbt/dict_elm.c
b/src/xbt/dict_elm.c
index
162f7dc
..
4711ede
100644
(file)
--- a/
src/xbt/dict_elm.c
+++ b/
src/xbt/dict_elm.c
@@
-50,13
+50,13
@@
static gras_error_t _gras_dictelm_dump_rec(gras_dictelm_t *head,
-static gras_error_t _gras_dictelm_
inser
t_rec(gras_dictelm_t *head,
+static gras_error_t _gras_dictelm_
se
t_rec(gras_dictelm_t *head,
char *key,
int key_len,
int offset,
void *data,
void_f_pvoid_t *free_ctn);
char *key,
int key_len,
int offset,
void *data,
void_f_pvoid_t *free_ctn);
-static gras_error_t _gras_dictelm_
retrieve
_rec(gras_dictelm_t *head,
+static gras_error_t _gras_dictelm_
get
_rec(gras_dictelm_t *head,
const char *key,
int key_len,
int offset,
const char *key,
int key_len,
int offset,
@@
-413,22
+413,22
@@
_gras_dictelm_change_value(gras_dictelm_t *p_elm,
}
/**
}
/**
- * _gras_dictelm_
inser
t_rec:
+ * _gras_dictelm_
se
t_rec:
*
* @head: the head of the dict
*
* @head: the head of the dict
- * @key: the key to
inser
t the new data
+ * @key: the key to
se
t the new data
* @offset: offset on key.
* @data: the data to add in the dict
* @Returns: a gras_error
*
* @offset: offset on key.
* @data: the data to add in the dict
* @Returns: a gras_error
*
- *
Inser
t the @data in the structure under the @key. The @key is destroyed
+ *
se
t the @data in the structure under the @key. The @key is destroyed
* in the process. Think to strdup it before.
*
* in the process. Think to strdup it before.
*
- * This is a helper function to gras_dict_
inser
t which locks the struct and
+ * This is a helper function to gras_dict_
se
t which locks the struct and
* strdup the key before action.
*/
gras_error_t
* strdup the key before action.
*/
gras_error_t
-_gras_dictelm_
inser
t_rec(gras_dictelm_t *p_head,
+_gras_dictelm_
se
t_rec(gras_dictelm_t *p_head,
char *key,
int key_len,
int offset,
char *key,
int key_len,
int offset,
@@
-495,7
+495,7
@@
_gras_dictelm_insert_rec(gras_dictelm_t *p_head,
gras_dynar_get(p_head->sub, pos, &p_child);
CDEBUG2(dict_add,"-> Recurse on %p (offset=%d)", p_child, offset);
gras_dynar_get(p_head->sub, pos, &p_child);
CDEBUG2(dict_add,"-> Recurse on %p (offset=%d)", p_child, offset);
- return _gras_dictelm_
inser
t_rec(p_child, key, key_len,
+ return _gras_dictelm_
se
t_rec(p_child, key, key_len,
offset, data, free_ctn);
}
offset, data, free_ctn);
}
@@
-557,18
+557,18
@@
_gras_dictelm_insert_rec(gras_dictelm_t *p_head,
}
/**
}
/**
- * gras_dictelm_
inser
t_ext:
+ * gras_dictelm_
se
t_ext:
*
* @head: the head of the dict
*
* @head: the head of the dict
- * @key: the key to
inser
t the new data
+ * @key: the key to
se
t the new data
* @data: the data to add in the dict
* @Returns: a gras_error
*
* @data: the data to add in the dict
* @Returns: a gras_error
*
- *
Inser
t the @data in the structure under the @key, which can be any kind
+ *
se
t the @data in the structure under the @key, which can be any kind
* of data, as long as its length is provided in @key_len.
*/
gras_error_t
* of data, as long as its length is provided in @key_len.
*/
gras_error_t
-gras_dictelm_
inser
t_ext(gras_dictelm_t **pp_head,
+gras_dictelm_
se
t_ext(gras_dictelm_t **pp_head,
const char *_key,
int key_len,
void *data,
const char *_key,
int key_len,
void *data,
@@
-598,31
+598,31
@@
gras_dictelm_insert_ext(gras_dictelm_t **pp_head,
return errcode;
}
return errcode;
}
- return _gras_dictelm_
inser
t_rec(p_head, key, key_len, 0, data, free_ctn);
+ return _gras_dictelm_
se
t_rec(p_head, key, key_len, 0, data, free_ctn);
}
/**
}
/**
- * gras_dictelm_
inser
t:
+ * gras_dictelm_
se
t:
*
* @head: the head of the dict
*
* @head: the head of the dict
- * @key: the key to
inser
t the new data
+ * @key: the key to
se
t the new data
* @data: the data to add in the dict
* @Returns: a gras_error
*
* @data: the data to add in the dict
* @Returns: a gras_error
*
- *
Inser
t the @data in the structure under the @key, which is a
+ *
se
t the @data in the structure under the @key, which is a
* null terminated string.
*/
gras_error_t
* null terminated string.
*/
gras_error_t
-gras_dictelm_
inser
t(gras_dictelm_t **pp_head,
+gras_dictelm_
se
t(gras_dictelm_t **pp_head,
const char *_key,
void *data,
void_f_pvoid_t *free_ctn) {
const char *_key,
void *data,
void_f_pvoid_t *free_ctn) {
- return gras_dictelm_
inser
t_ext(pp_head, _key, 1+strlen(_key), data, free_ctn);
+ return gras_dictelm_
se
t_ext(pp_head, _key, 1+strlen(_key), data, free_ctn);
}
/**
}
/**
- * _gras_dict_
retrieve
_rec:
+ * _gras_dict_
get
_rec:
*
* @head: the head of the dict
* @key: the key to find data
*
* @head: the head of the dict
* @key: the key to find data
@@
-634,7
+634,7
@@
gras_dictelm_insert(gras_dictelm_t **pp_head,
*/
static
gras_error_t
*/
static
gras_error_t
-_gras_dictelm_
retrieve
_rec(gras_dictelm_t *p_head,
+_gras_dictelm_
get
_rec(gras_dictelm_t *p_head,
const char *key,
int key_len,
int offset,
const char *key,
int key_len,
int offset,
@@
-683,7
+683,7
@@
_gras_dictelm_retrieve_rec(gras_dictelm_t *p_head,
gras_dynar_get(p_head->sub, pos, &p_child);
gras_dynar_get(p_head->sub, pos, &p_child);
- return _gras_dictelm_
retrieve
_rec(p_child, key, key_len, offset, data);
+ return _gras_dictelm_
get
_rec(p_child, key, key_len, offset, data);
}
case 3: /* The key is a prefix of the child => not found */
}
case 3: /* The key is a prefix of the child => not found */
@@
-699,7
+699,7
@@
_gras_dictelm_retrieve_rec(gras_dictelm_t *p_head,
}
/**
}
/**
- * gras_dictelm_
retrieve
_ext:
+ * gras_dictelm_
get
_ext:
*
* @head: the head of the dict
* @key: the key to find data
*
* @head: the head of the dict
* @key: the key to find data
@@
-709,7
+709,7
@@
_gras_dictelm_retrieve_rec(gras_dictelm_t *p_head,
* Search the given @key. mismatch_error when not found.
*/
gras_error_t
* Search the given @key. mismatch_error when not found.
*/
gras_error_t
-gras_dictelm_
retrieve
_ext(gras_dictelm_t *p_head,
+gras_dictelm_
get
_ext(gras_dictelm_t *p_head,
const char *key,
int key_len,
/* OUT */void **data) {
const char *key,
int key_len,
/* OUT */void **data) {
@@
-718,11
+718,11
@@
gras_dictelm_retrieve_ext(gras_dictelm_t *p_head,
return mismatch_error;
}
return mismatch_error;
}
- return _gras_dictelm_
retrieve
_rec(p_head, key, key_len, 0, data);
+ return _gras_dictelm_
get
_rec(p_head, key, key_len, 0, data);
}
/**
}
/**
- * gras_dictelm_
retrieve
:
+ * gras_dictelm_
get
:
*
* @head: the head of the dict
* @key: the key to find data
*
* @head: the head of the dict
* @key: the key to find data
@@
-732,11
+732,11
@@
gras_dictelm_retrieve_ext(gras_dictelm_t *p_head,
* Search the given @key. mismatch_error when not found.
*/
gras_error_t
* Search the given @key. mismatch_error when not found.
*/
gras_error_t
-gras_dictelm_
retrieve
(gras_dictelm_t *p_head,
+gras_dictelm_
get
(gras_dictelm_t *p_head,
const char *key,
/* OUT */void **data) {
const char *key,
/* OUT */void **data) {
- return gras_dictelm_
retrieve
_ext(p_head, key, 1+strlen(key), data);
+ return gras_dictelm_
get
_ext(p_head, key, 1+strlen(key), data);
}
/*----[ _gras_dict_collapse ]------------------------------------------------*/
}
/*----[ _gras_dict_collapse ]------------------------------------------------*/