aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Hanspeter Portner <dev@open-music-kontrollers.ch>2019-08-05 21:12:25 +0200
committerGravatar Hanspeter Portner <dev@open-music-kontrollers.ch>2019-08-05 21:12:25 +0200
commita195b56abaa730c879b8ca5088b88937ac577743 (patch)
tree1a2703da724ce8190dd2e7f183451bb21dff5898
parent2ec09d3924582cae1955c9050f86577ab71e810a (diff)
parent7e92dc64a53914cbbf9e744824570ae25ccf982d (diff)
downloadsynthpod-a195b56abaa730c879b8ca5088b88937ac577743.zip
synthpod-a195b56abaa730c879b8ca5088b88937ac577743.tar.gz
synthpod-a195b56abaa730c879b8ca5088b88937ac577743.tar.bz2
synthpod-a195b56abaa730c879b8ca5088b88937ac577743.tar.xz
Merge commit '7e92dc64a53914cbbf9e744824570ae25ccf982d'
-rw-r--r--subprojects/d2tk/VERSION2
-rw-r--r--subprojects/d2tk/d2tk/hash.h4
-rw-r--r--subprojects/d2tk/src/backend_cairo.c4
-rw-r--r--subprojects/d2tk/src/backend_nanovg.c4
-rw-r--r--subprojects/d2tk/src/mum.c4
5 files changed, 9 insertions, 9 deletions
diff --git a/subprojects/d2tk/VERSION b/subprojects/d2tk/VERSION
index 75dd97f..eddad3c 100644
--- a/subprojects/d2tk/VERSION
+++ b/subprojects/d2tk/VERSION
@@ -1 +1 @@
-0.1.775
+0.1.779
diff --git a/subprojects/d2tk/d2tk/hash.h b/subprojects/d2tk/d2tk/hash.h
index be69e92..52cf33e 100644
--- a/subprojects/d2tk/d2tk/hash.h
+++ b/subprojects/d2tk/d2tk/hash.h
@@ -35,10 +35,10 @@ struct _d2tk_hash_dict_t {
};
D2TK_API uint64_t
-d2tk_hash(const void *data, ssize_t nbytes);
+d2tk_hash(const void *data, size_t nbytes);
D2TK_API uint64_t
-d2tk_hash_foreach(const void *data, ssize_t nbytes, ...) __attribute__((sentinel));
+d2tk_hash_foreach(const void *data, size_t nbytes, ...) __attribute__((sentinel));
D2TK_API uint64_t
d2tk_hash_dict(const d2tk_hash_dict_t *dict);
diff --git a/subprojects/d2tk/src/backend_cairo.c b/subprojects/d2tk/src/backend_cairo.c
index 0cfadb3..0c9bcd9 100644
--- a/subprojects/d2tk/src/backend_cairo.c
+++ b/subprojects/d2tk/src/backend_cairo.c
@@ -570,7 +570,7 @@ d2tk_cairo_process(void *data, d2tk_core_t *core, const d2tk_com_t *com,
{
const d2tk_body_font_face_t *body = &com->body->font_face;
- const uint64_t hash = d2tk_hash(body->face, -1);
+ const uint64_t hash = d2tk_hash(body->face, strlen(body->face));
uintptr_t *sprite = d2tk_core_get_sprite(core, hash, SPRITE_TYPE_FONT);
assert(sprite);
@@ -649,7 +649,7 @@ d2tk_cairo_process(void *data, d2tk_core_t *core, const d2tk_com_t *com,
{
const d2tk_body_image_t *body = &com->body->image;
- const uint64_t hash = d2tk_hash(body->path, -1);
+ const uint64_t hash = d2tk_hash(body->path, strlen(body->path));
uintptr_t *sprite = d2tk_core_get_sprite(core, hash, SPRITE_TYPE_SURF);
assert(sprite);
diff --git a/subprojects/d2tk/src/backend_nanovg.c b/subprojects/d2tk/src/backend_nanovg.c
index fe5d377..1086d94 100644
--- a/subprojects/d2tk/src/backend_nanovg.c
+++ b/subprojects/d2tk/src/backend_nanovg.c
@@ -651,7 +651,7 @@ d2tk_nanovg_process(void *data, d2tk_core_t *core, const d2tk_com_t *com,
{
const d2tk_body_font_face_t *body = &com->body->font_face;
- const uint64_t hash = d2tk_hash(body->face, -1);
+ const uint64_t hash = d2tk_hash(body->face, strlen(body->face));
uintptr_t *sprite = d2tk_core_get_sprite(core, hash, SPRITE_TYPE_FONT);
assert(sprite);
@@ -723,7 +723,7 @@ d2tk_nanovg_process(void *data, d2tk_core_t *core, const d2tk_com_t *com,
{
const d2tk_body_image_t *body = &com->body->image;
- const uint64_t hash = d2tk_hash(body->path, -1);
+ const uint64_t hash = d2tk_hash(body->path, strlen(body->path));
uintptr_t *sprite = d2tk_core_get_sprite(core, hash, SPRITE_TYPE_IMG);
assert(sprite);
diff --git a/subprojects/d2tk/src/mum.c b/subprojects/d2tk/src/mum.c
index 49825a3..358a3dc 100644
--- a/subprojects/d2tk/src/mum.c
+++ b/subprojects/d2tk/src/mum.c
@@ -32,13 +32,13 @@ _d2tk_hash(uint64_t hash, const void *key, size_t len)
}
D2TK_API uint64_t
-d2tk_hash(const void *key, ssize_t len)
+d2tk_hash(const void *key, size_t len)
{
return mum_hash(key, len, SEED);
}
D2TK_API uint64_t
-d2tk_hash_foreach(const void *key, ssize_t len, ...)
+d2tk_hash_foreach(const void *key, size_t len, ...)
{
va_list args;
uint64_t hash = mum_hash_init(SEED);