summaryrefslogtreecommitdiffstats
path: root/src/state.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-04-06 20:29:20 +0000
committerDavid Robillard <d@drobilla.net>2012-04-06 20:29:20 +0000
commita8f6cb4e48371ace96a462134b72798020bdfee5 (patch)
tree537daa21826171285477007cbf3c820ea25d4453 /src/state.c
parent3e790252a8285d85ad2aaccf3bd575867385ba29 (diff)
downloadlilv-a8f6cb4e48371ace96a462134b72798020bdfee5.tar.gz
lilv-a8f6cb4e48371ace96a462134b72798020bdfee5.tar.bz2
lilv-a8f6cb4e48371ace96a462134b72798020bdfee5.zip
Fix compilation under MSVC.
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@4149 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/state.c')
-rw-r--r--src/state.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/state.c b/src/state.c
index a9dfe27..735a8e4 100644
--- a/src/state.c
+++ b/src/state.c
@@ -159,7 +159,7 @@ store_callback(LV2_State_Handle handle,
prop->type = type;
prop->flags = flags;
- return 0;
+ return LV2_STATE_SUCCESS;
}
static const void*
@@ -839,7 +839,8 @@ lilv_state_write(LilvWorld* world,
p = serd_node_from_string(SERD_URI, USTR(key));
if (prop->type == state->atom_Path && !dir) {
- const char* abs_path = lilv_state_rel2abs(state, prop->value);
+ const char* path = (const char*)prop->value;
+ const char* abs_path = lilv_state_rel2abs(state, path);
sratom_write(sratom, unmap, SERD_ANON_CONT,
&state_node, &p, prop->type,
strlen(abs_path) + 1, abs_path);
@@ -1071,6 +1072,6 @@ void
lilv_state_set_label(LilvState* state, const char* label)
{
const size_t len = strlen(label);
- state->label = realloc(state->label, len + 1);
+ state->label = (char*)realloc(state->label, len + 1);
memcpy(state->label, label, len + 1);
}