diff options
author | David Robillard <d@drobilla.net> | 2012-01-17 02:13:19 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-01-17 02:13:19 +0000 |
commit | 33b20e5c20b0bbac5db9d8022ee5499b8cb95b5c (patch) | |
tree | 8017b89fe372677d21d73782ab0b2a6a4cdb99b6 /src/node.c | |
parent | 012e8a8785abcbf403d842d67303d7470b33694c (diff) | |
download | lilv-33b20e5c20b0bbac5db9d8022ee5499b8cb95b5c.tar.gz lilv-33b20e5c20b0bbac5db9d8022ee5499b8cb95b5c.tar.bz2 lilv-33b20e5c20b0bbac5db9d8022ee5499b8cb95b5c.zip |
Support compilation as C++ under MSVC++,
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@3955 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/node.c')
-rw-r--r-- | src/node.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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: |