aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2019-08-05 21:12:25 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2019-08-05 21:12:25 +0200
commit7e92dc64a53914cbbf9e744824570ae25ccf982d (patch)
treec312d7dfac895d95423b1f62a82078a7b8b1110b
parentc2571673eb66e83da2be2220d5338b911d299fcc (diff)
downloadsynthpod-7e92dc64a53914cbbf9e744824570ae25ccf982d.tar.xz
Squashed 'subprojects/d2tk/' changes from 66f4b6b7..96803ab6
96803ab6 backend fixed for last commit. git-subtree-dir: subprojects/d2tk git-subtree-split: 96803ab69db013383fa8575529545fb14affc774
-rw-r--r--VERSION2
-rw-r--r--d2tk/hash.h4
-rw-r--r--src/backend_cairo.c4
-rw-r--r--src/backend_nanovg.c4
-rw-r--r--src/mum.c4
5 files changed, 9 insertions, 9 deletions
diff --git a/VERSION b/VERSION
index 75dd97f9..eddad3c8 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.1.775
+0.1.779
diff --git a/d2tk/hash.h b/d2tk/hash.h
index be69e927..52cf33e2 100644
--- a/d2tk/hash.h
+++ b/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/src/backend_cairo.c b/src/backend_cairo.c
index 0cfadb33..0c9bcd9f 100644
--- a/src/backend_cairo.c
+++ b/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/src/backend_nanovg.c b/src/backend_nanovg.c
index fe5d3775..1086d941 100644
--- a/src/backend_nanovg.c
+++ b/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/src/mum.c b/src/mum.c
index 49825a37..358a3dcf 100644
--- a/src/mum.c
+++ b/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);