summaryrefslogtreecommitdiffstats
path: root/src/scalepoint.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-04-29 02:03:23 +0000
committerDavid Robillard <d@drobilla.net>2011-04-29 02:03:23 +0000
commitb4cd6dd752c8da20e61abd3774bf9302724a773f (patch)
tree0f3ba5dc84d8bdbf094da63d1f20ef928a803b0f /src/scalepoint.c
parent7aa935080bae3299dbfab41955ed93d6b68f39bf (diff)
downloadlilv-b4cd6dd752c8da20e61abd3774bf9302724a773f.tar.gz
lilv-b4cd6dd752c8da20e61abd3774bf9302724a773f.tar.bz2
lilv-b4cd6dd752c8da20e61abd3774bf9302724a773f.zip
Don't hide pointers behind typedefs.
Use const appropriately in API (makes it clear from the type whether objects should be freed or not). git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@3222 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/scalepoint.c')
-rw-r--r--src/scalepoint.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/scalepoint.c b/src/scalepoint.c
index aa27d04..0f3c7f6 100644
--- a/src/scalepoint.c
+++ b/src/scalepoint.c
@@ -17,17 +17,18 @@
#include "lilv_internal.h"
/** Ownership of value and label is taken */
-LilvScalePoint
-lilv_scale_point_new(LilvValue value, LilvValue label)
+LilvScalePoint*
+lilv_scale_point_new(LilvValue* value, LilvValue* label)
{
- LilvScalePoint point = (LilvScalePoint)malloc(sizeof(struct _LilvScalePoint));
+ LilvScalePoint* point = (LilvScalePoint*)malloc(
+ sizeof(struct LilvScalePointImpl));
point->value = value;
point->label = label;
return point;
}
void
-lilv_scale_point_free(LilvScalePoint point)
+lilv_scale_point_free(LilvScalePoint* point)
{
lilv_value_free(point->value);
lilv_value_free(point->label);
@@ -35,15 +36,15 @@ lilv_scale_point_free(LilvScalePoint point)
}
LILV_API
-LilvValue
-lilv_scale_point_get_value(LilvScalePoint p)
+const LilvValue*
+lilv_scale_point_get_value(const LilvScalePoint* p)
{
return p->value;
}
LILV_API
-LilvValue
-lilv_scale_point_get_label(LilvScalePoint p)
+const LilvValue*
+lilv_scale_point_get_label(const LilvScalePoint* p)
{
return p->label;
}