summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fd04453)
raw | patch | inline | side by side (parent: fd04453)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Tue, 4 Aug 2009 10:21:07 +0000 (12:21 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Tue, 4 Aug 2009 10:21:07 +0000 (12:21 +0200) |
The struct is only needed to build the name (a string) anyway..
src/utils_cache.c | patch | blob | history | |
src/utils_cache.h | patch | blob | history |
diff --git a/src/utils_cache.c b/src/utils_cache.c
index 91a60f0d8ed77aa22915702e9fbd0ea1c93802cc..38d0ce766463c52d7dc2fd5ab0d6922939f868a1 100644 (file)
--- a/src/utils_cache.c
+++ b/src/utils_cache.c
* Meta data interface
*/
/* XXX: This function will acquire `cache_lock' but will not free it! */
-static meta_data_t *uc_get_meta (value_list_t *vl) /* {{{ */
+static meta_data_t *uc_get_meta (const value_list_t *vl) /* {{{ */
{
char name[6 * DATA_MAX_NAME_LEN];
cache_entry_t *ce = NULL;
pthread_mutex_unlock (&cache_lock); \
return (status); \
}
-int uc_meta_data_exists (value_list_t *vl, const char *key)
+int uc_meta_data_exists (const value_list_t *vl, const char *key)
UC_WRAP (meta_data_exists)
-int uc_meta_data_delete (value_list_t *vl, const char *key)
+int uc_meta_data_delete (const value_list_t *vl, const char *key)
UC_WRAP (meta_data_delete)
#undef UC_WRAP
pthread_mutex_unlock (&cache_lock); \
return (status); \
}
-int uc_meta_data_add_string (value_list_t *vl,
+int uc_meta_data_add_string (const value_list_t *vl,
const char *key,
const char *value)
UC_WRAP(meta_data_add_string)
-int uc_meta_data_add_signed_int (value_list_t *vl,
+int uc_meta_data_add_signed_int (const value_list_t *vl,
const char *key,
int64_t value)
UC_WRAP(meta_data_add_signed_int)
-int uc_meta_data_add_unsigned_int (value_list_t *vl,
+int uc_meta_data_add_unsigned_int (const value_list_t *vl,
const char *key,
uint64_t value)
UC_WRAP(meta_data_add_unsigned_int)
-int uc_meta_data_add_double (value_list_t *vl,
+int uc_meta_data_add_double (const value_list_t *vl,
const char *key,
double value)
UC_WRAP(meta_data_add_double)
-int uc_meta_data_add_boolean (value_list_t *vl,
+int uc_meta_data_add_boolean (const value_list_t *vl,
const char *key,
_Bool value)
UC_WRAP(meta_data_add_boolean)
-int uc_meta_data_get_string (value_list_t *vl,
+int uc_meta_data_get_string (const value_list_t *vl,
const char *key,
char **value)
UC_WRAP(meta_data_get_string)
-int uc_meta_data_get_signed_int (value_list_t *vl,
+int uc_meta_data_get_signed_int (const value_list_t *vl,
const char *key,
int64_t *value)
UC_WRAP(meta_data_get_signed_int)
-int uc_meta_data_get_unsigned_int (value_list_t *vl,
+int uc_meta_data_get_unsigned_int (const value_list_t *vl,
const char *key,
uint64_t *value)
UC_WRAP(meta_data_get_unsigned_int)
-int uc_meta_data_get_double (value_list_t *vl,
+int uc_meta_data_get_double (const value_list_t *vl,
const char *key,
double *value)
UC_WRAP(meta_data_get_double)
-int uc_meta_data_get_boolean (value_list_t *vl,
+int uc_meta_data_get_boolean (const value_list_t *vl,
const char *key,
_Bool *value)
UC_WRAP(meta_data_get_boolean)
diff --git a/src/utils_cache.h b/src/utils_cache.h
index b7dc2bf387266e7b860e1be40822be9cdac60d96..91a6a6d80913dbd3258974c703760050c4995d4f 100644 (file)
--- a/src/utils_cache.h
+++ b/src/utils_cache.h
/*
* Meta data interface
*/
-int uc_meta_data_exists (value_list_t *vl, const char *key);
-int uc_meta_data_delete (value_list_t *vl, const char *key);
+int uc_meta_data_exists (const value_list_t *vl, const char *key);
+int uc_meta_data_delete (const value_list_t *vl, const char *key);
-int uc_meta_data_add_string (value_list_t *vl,
+int uc_meta_data_add_string (const value_list_t *vl,
const char *key,
const char *value);
-int uc_meta_data_add_signed_int (value_list_t *vl,
+int uc_meta_data_add_signed_int (const value_list_t *vl,
const char *key,
int64_t value);
-int uc_meta_data_add_unsigned_int (value_list_t *vl,
+int uc_meta_data_add_unsigned_int (const value_list_t *vl,
const char *key,
uint64_t value);
-int uc_meta_data_add_double (value_list_t *vl,
+int uc_meta_data_add_double (const value_list_t *vl,
const char *key,
double value);
-int uc_meta_data_add_boolean (value_list_t *vl,
+int uc_meta_data_add_boolean (const value_list_t *vl,
const char *key,
_Bool value);
-int uc_meta_data_get_string (value_list_t *vl,
+int uc_meta_data_get_string (const value_list_t *vl,
const char *key,
char **value);
-int uc_meta_data_get_signed_int (value_list_t *vl,
+int uc_meta_data_get_signed_int (const value_list_t *vl,
const char *key,
int64_t *value);
-int uc_meta_data_get_unsigned_int (value_list_t *vl,
+int uc_meta_data_get_unsigned_int (const value_list_t *vl,
const char *key,
uint64_t *value);
-int uc_meta_data_get_double (value_list_t *vl,
+int uc_meta_data_get_double (const value_list_t *vl,
const char *key,
double *value);
-int uc_meta_data_get_boolean (value_list_t *vl,
+int uc_meta_data_get_boolean (const value_list_t *vl,
const char *key,
_Bool *value);