summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/value.c11
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)
{