From 33b20e5c20b0bbac5db9d8022ee5499b8cb95b5c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 17 Jan 2012 02:13:19 +0000 Subject: Support compilation as C++ under MSVC++, git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@3955 a436a847-0d15-0410-975c-d299462d15a1 --- src/node.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/node.c') diff --git a/src/node.c b/src/node.c index 169afa1..de35175 100644 --- a/src/node.c +++ b/src/node.c @@ -53,7 +53,7 @@ lilv_node_set_numerics_from_string(LilvNode* val, size_t len) LilvNode* lilv_node_new(LilvWorld* world, LilvNodeType type, const char* str) { - LilvNode* val = malloc(sizeof(struct LilvNodeImpl)); + LilvNode* val = (LilvNode*)malloc(sizeof(LilvNode)); val->world = world; val->type = type; @@ -88,14 +88,14 @@ lilv_node_new_from_node(LilvWorld* world, const SordNode* node) switch (sord_node_get_type(node)) { case SORD_URI: - result = malloc(sizeof(struct LilvNodeImpl)); + result = (LilvNode*)malloc(sizeof(LilvNode)); result->world = (LilvWorld*)world; result->type = LILV_VALUE_URI; result->val.uri_val = sord_node_copy(node); result->str_val = (char*)sord_node_get_string(result->val.uri_val); break; case SORD_BLANK: - result = malloc(sizeof(struct LilvNodeImpl)); + result = (LilvNode*)malloc(sizeof(LilvNode)); result->world = (LilvWorld*)world; result->type = LILV_VALUE_BLANK; result->val.uri_val = sord_node_copy(node); @@ -182,7 +182,7 @@ lilv_node_duplicate(const LilvNode* val) if (val == NULL) return NULL; - LilvNode* result = malloc(sizeof(struct LilvNodeImpl)); + LilvNode* result = (LilvNode*)malloc(sizeof(LilvNode)); result->world = val->world; result->type = val->type; @@ -260,12 +260,12 @@ lilv_node_get_turtle_token(const LilvNode* value) switch (value->type) { case LILV_VALUE_URI: len = strlen(value->str_val) + 3; - result = calloc(len, 1); + result = (char*)calloc(len, 1); snprintf(result, len, "<%s>", value->str_val); break; case LILV_VALUE_BLANK: len = strlen(value->str_val) + 3; - result = calloc(len, 1); + result = (char*)calloc(len, 1); snprintf(result, len, "_:%s", value->str_val); break; case LILV_VALUE_STRING: -- cgit v1.2.1