diff options
-rw-r--r-- | bench/libdimension/array.c | 4 | ||||
-rw-r--r-- | bench/libdimension/list.c | 2 | ||||
-rw-r--r-- | libdimension/dictionary.c | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/bench/libdimension/array.c b/bench/libdimension/array.c index 137d532..3fe0c83 100644 --- a/bench/libdimension/array.c +++ b/bench/libdimension/array.c @@ -66,12 +66,12 @@ main(void) /* dmnsn_array_at() */ void *ptr; sandglass_bench_fine(&sandglass, ptr = dmnsn_array_at(array, count/2)); - printf("dmnsn_array_at(): %ld\n", sandglass.grains); + printf("dmnsn_array_at() = %p: %ld\n", ptr, sandglass.grains); /* dmnsn_array_size() */ size_t size; sandglass_bench_fine(&sandglass, size = dmnsn_array_size(array)); - printf("dmnsn_array_size(): %ld\n", sandglass.grains); + printf("dmnsn_array_size() = %zu: %ld\n", size, sandglass.grains); /* dmnsn_array_resize() */ dmnsn_array_resize(array, count); diff --git a/bench/libdimension/list.c b/bench/libdimension/list.c index ce6c6cc..e00b510 100644 --- a/bench/libdimension/list.c +++ b/bench/libdimension/list.c @@ -86,7 +86,7 @@ main(void) /* dmnsn_list_size() */ size_t size; sandglass_bench_fine(&sandglass, size = dmnsn_list_size(list)); - printf("dmnsn_list_size(): %ld\n", sandglass.grains); + printf("dmnsn_list_size() = %zu: %ld\n", size, sandglass.grains); /* dmnsn_list_insert() */ diff --git a/libdimension/dictionary.c b/libdimension/dictionary.c index 83efe1d..ea6bbdc 100644 --- a/libdimension/dictionary.c +++ b/libdimension/dictionary.c @@ -88,7 +88,7 @@ dmnsn_dictionary_at(const dmnsn_dictionary *dict, const char *key) return dict->value; } else { dmnsn_dictionary **first = dmnsn_array_first(dict->children), **subtrie; - size_t size = dmnsn_array_size(dict->children); + ptrdiff_t size = dmnsn_array_size(dict->children); for (subtrie = first; subtrie - first < size; ++subtrie) { len = strlen((*subtrie)->prefix); if (strncmp(key, (*subtrie)->prefix, len) == 0) { @@ -144,7 +144,7 @@ dmnsn_dictionary_insert(dmnsn_dictionary *dict, const char *key, } else if (*prefix == '\0') { /* Partial match; key starts with prefix */ dmnsn_dictionary **first = dmnsn_array_first(dict->children), **subtrie; - size_t size = dmnsn_array_size(dict->children); + ptrdiff_t size = dmnsn_array_size(dict->children); for (subtrie = first; subtrie - first < size; ++subtrie) { if ((*subtrie)->prefix[0] == key[0]) { dict = *subtrie; @@ -203,7 +203,7 @@ dmnsn_dictionary_remove(dmnsn_dictionary *dict, const char *key) return true; } else { dmnsn_dictionary **first = dmnsn_array_first(dict->children), **subtrie; - size_t size = dmnsn_array_size(dict->children); + ptrdiff_t size = dmnsn_array_size(dict->children); for (subtrie = first; subtrie - first < size; ++subtrie) { len = strlen((*subtrie)->prefix); if (strncmp(key, (*subtrie)->prefix, len) == 0) { |