diff options
author | David Robillard <d@drobilla.net> | 2007-06-27 15:55:22 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-06-27 15:55:22 +0000 |
commit | 8d964fa7e72ebf076cd40a0b72caf778ce82fb85 (patch) | |
tree | 406bf1d58351c98dccf812d23d18e11b6e4e03d0 /src/value.c | |
parent | f323c56e8bf061741fa32e10c610e21aed622923 (diff) | |
download | lilv-8d964fa7e72ebf076cd40a0b72caf778ce82fb85.tar.gz lilv-8d964fa7e72ebf076cd40a0b72caf778ce82fb85.tar.bz2 lilv-8d964fa7e72ebf076cd40a0b72caf778ce82fb85.zip |
Added slv2_value_duplicate.
git-svn-id: http://svn.drobilla.net/lad/slv2@545 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/value.c')
-rw-r--r-- | src/value.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/value.c b/src/value.c index 331c20c..f4dc673 100644 --- a/src/value.c +++ b/src/value.c @@ -50,6 +50,17 @@ slv2_value_new(SLV2ValueType type, const char* str) } +SLV2Value +slv2_value_duplicate(SLV2Value val) +{ + SLV2Value result = (SLV2Value)malloc(sizeof(struct _SLV2Value)); + result->str_val = strdup(val->str_val); + result->type = val->type; + result->val = val->val; + return result; +} + + void slv2_value_free(SLV2Value val) { |