aboutsummaryrefslogtreecommitdiff
path: root/src/datacache
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-10-06 11:44:29 +0000
committerChristian Grothoff <christian@grothoff.org>2010-10-06 11:44:29 +0000
commitb8da6057b2c0c66931ccde9b4bba418fc5222724 (patch)
tree1e858619686d7e2d38655f9f24bdc64e3e4e8462 /src/datacache
parent7d2cbe5bd19ec95ada5a28a0134185ef29007b69 (diff)
downloadgnunet-b8da6057b2c0c66931ccde9b4bba418fc5222724.tar.gz
gnunet-b8da6057b2c0c66931ccde9b4bba418fc5222724.zip
use size_t
Diffstat (limited to 'src/datacache')
-rw-r--r--src/datacache/datacache.c4
-rw-r--r--src/datacache/perf_datacache.c2
-rw-r--r--src/datacache/plugin_datacache.h14
-rw-r--r--src/datacache/plugin_datacache_mysql.c4
-rw-r--r--src/datacache/plugin_datacache_postgres.c4
-rw-r--r--src/datacache/plugin_datacache_sqlite.c4
-rw-r--r--src/datacache/plugin_datacache_template.c4
-rw-r--r--src/datacache/test_datacache.c2
8 files changed, 19 insertions, 19 deletions
diff --git a/src/datacache/datacache.c b/src/datacache/datacache.c
index 9c1a90bca..d2aa2616a 100644
--- a/src/datacache/datacache.c
+++ b/src/datacache/datacache.c
@@ -100,7 +100,7 @@ struct GNUNET_DATACACHE_Handle
100static void 100static void
101env_delete_notify (void *cls, 101env_delete_notify (void *cls,
102 const GNUNET_HashCode *key, 102 const GNUNET_HashCode *key,
103 uint32_t size) 103 size_t size)
104{ 104{
105 struct GNUNET_DATACACHE_Handle * h = cls; 105 struct GNUNET_DATACACHE_Handle * h = cls;
106 GNUNET_assert (h->utilization >= size); 106 GNUNET_assert (h->utilization >= size);
@@ -237,7 +237,7 @@ void GNUNET_DATACACHE_destroy (struct GNUNET_DATACACHE_Handle *h)
237int 237int
238GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h, 238GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h,
239 const GNUNET_HashCode * key, 239 const GNUNET_HashCode * key,
240 uint32_t size, 240 size_t size,
241 const char *data, 241 const char *data,
242 enum GNUNET_BLOCK_Type type, 242 enum GNUNET_BLOCK_Type type,
243 struct GNUNET_TIME_Absolute discard_time) 243 struct GNUNET_TIME_Absolute discard_time)
diff --git a/src/datacache/perf_datacache.c b/src/datacache/perf_datacache.c
index 10efa5eee..023199231 100644
--- a/src/datacache/perf_datacache.c
+++ b/src/datacache/perf_datacache.c
@@ -46,7 +46,7 @@ static int
46checkIt (void *cls, 46checkIt (void *cls,
47 struct GNUNET_TIME_Absolute exp, 47 struct GNUNET_TIME_Absolute exp,
48 const GNUNET_HashCode * key, 48 const GNUNET_HashCode * key,
49 uint32_t size, 49 size_t size,
50 const char *data, 50 const char *data,
51 enum GNUNET_BLOCK_Type type) 51 enum GNUNET_BLOCK_Type type)
52{ 52{
diff --git a/src/datacache/plugin_datacache.h b/src/datacache/plugin_datacache.h
index c7360834b..bf35b2619 100644
--- a/src/datacache/plugin_datacache.h
+++ b/src/datacache/plugin_datacache.h
@@ -47,7 +47,7 @@ extern "C"
47 */ 47 */
48typedef void (*GNUNET_DATACACHE_DeleteNotifyCallback)(void *cls, 48typedef void (*GNUNET_DATACACHE_DeleteNotifyCallback)(void *cls,
49 const GNUNET_HashCode *key, 49 const GNUNET_HashCode *key,
50 uint32_t size); 50 size_t size);
51 51
52 52
53/** 53/**
@@ -112,12 +112,12 @@ struct GNUNET_DATACACHE_PluginFunctions {
112 * @param discard_time when to discard the value in any case 112 * @param discard_time when to discard the value in any case
113 * @return 0 on error, number of bytes used otherwise 113 * @return 0 on error, number of bytes used otherwise
114 */ 114 */
115 uint32_t (*put) (void *cls, 115 size_t (*put) (void *cls,
116 const GNUNET_HashCode * key, 116 const GNUNET_HashCode * key,
117 uint32_t size, 117 size_t size,
118 const char *data, 118 const char *data,
119 enum GNUNET_BLOCK_Type type, 119 enum GNUNET_BLOCK_Type type,
120 struct GNUNET_TIME_Absolute discard_time); 120 struct GNUNET_TIME_Absolute discard_time);
121 121
122 122
123 /** 123 /**
diff --git a/src/datacache/plugin_datacache_mysql.c b/src/datacache/plugin_datacache_mysql.c
index a85e9f480..8241fb5f8 100644
--- a/src/datacache/plugin_datacache_mysql.c
+++ b/src/datacache/plugin_datacache_mysql.c
@@ -721,10 +721,10 @@ itable (struct Plugin *plugin)
721 * @param discard_time when to discard the value in any case 721 * @param discard_time when to discard the value in any case
722 * @return 0 on error, number of bytes used otherwise 722 * @return 0 on error, number of bytes used otherwise
723 */ 723 */
724static uint32_t 724static size_t
725mysql_plugin_put (void *cls, 725mysql_plugin_put (void *cls,
726 const GNUNET_HashCode * key, 726 const GNUNET_HashCode * key,
727 uint32_t size, 727 size_t size,
728 const char *data, 728 const char *data,
729 enum GNUNET_BLOCK_Type type, 729 enum GNUNET_BLOCK_Type type,
730 struct GNUNET_TIME_Absolute discard_time) 730 struct GNUNET_TIME_Absolute discard_time)
diff --git a/src/datacache/plugin_datacache_postgres.c b/src/datacache/plugin_datacache_postgres.c
index fcd9e5161..c9d6deaaa 100644
--- a/src/datacache/plugin_datacache_postgres.c
+++ b/src/datacache/plugin_datacache_postgres.c
@@ -301,10 +301,10 @@ delete_by_rowid (struct Plugin *plugin,
301 * @param discard_time when to discard the value in any case 301 * @param discard_time when to discard the value in any case
302 * @return 0 on error, number of bytes used otherwise 302 * @return 0 on error, number of bytes used otherwise
303 */ 303 */
304static uint32_t 304static size_t
305postgres_plugin_put (void *cls, 305postgres_plugin_put (void *cls,
306 const GNUNET_HashCode * key, 306 const GNUNET_HashCode * key,
307 uint32_t size, 307 size_t size,
308 const char *data, 308 const char *data,
309 enum GNUNET_BLOCK_Type type, 309 enum GNUNET_BLOCK_Type type,
310 struct GNUNET_TIME_Absolute discard_time) 310 struct GNUNET_TIME_Absolute discard_time)
diff --git a/src/datacache/plugin_datacache_sqlite.c b/src/datacache/plugin_datacache_sqlite.c
index 8c144baa2..5c304bd8a 100644
--- a/src/datacache/plugin_datacache_sqlite.c
+++ b/src/datacache/plugin_datacache_sqlite.c
@@ -94,10 +94,10 @@ sq_prepare (sqlite3 * dbh, const char *zSql, /* SQL statement, UTF-8 encoded
94 * @param discard_time when to discard the value in any case 94 * @param discard_time when to discard the value in any case
95 * @return 0 on error, number of bytes used otherwise 95 * @return 0 on error, number of bytes used otherwise
96 */ 96 */
97static uint32_t 97static size_t
98sqlite_plugin_put (void *cls, 98sqlite_plugin_put (void *cls,
99 const GNUNET_HashCode * key, 99 const GNUNET_HashCode * key,
100 uint32_t size, 100 size_t size,
101 const char *data, 101 const char *data,
102 enum GNUNET_BLOCK_Type type, 102 enum GNUNET_BLOCK_Type type,
103 struct GNUNET_TIME_Absolute discard_time) 103 struct GNUNET_TIME_Absolute discard_time)
diff --git a/src/datacache/plugin_datacache_template.c b/src/datacache/plugin_datacache_template.c
index 4ebf72661..25e4c9a42 100644
--- a/src/datacache/plugin_datacache_template.c
+++ b/src/datacache/plugin_datacache_template.c
@@ -51,10 +51,10 @@ struct Plugin
51 * @param discard_time when to discard the value in any case 51 * @param discard_time when to discard the value in any case
52 * @return 0 on error, number of bytes used otherwise 52 * @return 0 on error, number of bytes used otherwise
53 */ 53 */
54static uint32_t 54static size_t
55template_plugin_put (void *cls, 55template_plugin_put (void *cls,
56 const GNUNET_HashCode * key, 56 const GNUNET_HashCode * key,
57 uint32_t size, 57 size_t size,
58 const char *data, 58 const char *data,
59 enum GNUNET_BLOCK_Type type, 59 enum GNUNET_BLOCK_Type type,
60 struct GNUNET_TIME_Absolute discard_time) 60 struct GNUNET_TIME_Absolute discard_time)
diff --git a/src/datacache/test_datacache.c b/src/datacache/test_datacache.c
index 0c9399aff..da7894d6b 100644
--- a/src/datacache/test_datacache.c
+++ b/src/datacache/test_datacache.c
@@ -42,7 +42,7 @@ static int
42checkIt (void *cls, 42checkIt (void *cls,
43 struct GNUNET_TIME_Absolute exp, 43 struct GNUNET_TIME_Absolute exp,
44 const GNUNET_HashCode * key, 44 const GNUNET_HashCode * key,
45 uint32_t size, 45 size_t size,
46 const char *data, 46 const char *data,
47 enum GNUNET_BLOCK_Type type) 47 enum GNUNET_BLOCK_Type type)
48{ 48{