summaryrefslogtreecommitdiffstats
path: root/src/port.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-09-03 05:11:57 +0000
committerDavid Robillard <d@drobilla.net>2006-09-03 05:11:57 +0000
commit056f394151a48e9d129691fd7451a3d0bcbde3ba (patch)
treec7c95bccfc503e704003e33b9385aa4657d2a57a /src/port.c
parent6c8dc477bda2d6e67893f4475e603a11cf507017 (diff)
downloadlilv-056f394151a48e9d129691fd7451a3d0bcbde3ba.tar.gz
lilv-056f394151a48e9d129691fd7451a3d0bcbde3ba.tar.bz2
lilv-056f394151a48e9d129691fd7451a3d0bcbde3ba.zip
Saner (internal) query API, though still needs work.
Preliminary (untested) support for host features/extensions/whatever. Documentation fixes and minor cleanups. git-svn-id: http://svn.drobilla.net/lad/libslv2@113 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/port.c')
-rw-r--r--src/port.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/port.c b/src/port.c
index 111517d..1ca149d 100644
--- a/src/port.c
+++ b/src/port.c
@@ -73,13 +73,10 @@ slv2_port_get_property(SLV2Plugin* p,
uint32_t index,
const char* property)
{
- assert(p);
assert(property);
- char index_str[4];
- snprintf(index_str, (size_t)4, "%u", index);
-
- rasqal_init();
+ char index_str[16];
+ snprintf(index_str, (size_t)16, "%u", index);
char* query = strjoin(
"SELECT DISTINCT ?value FROM data: WHERE { \n"
@@ -87,12 +84,8 @@ slv2_port_get_property(SLV2Plugin* p,
"?port lv2:index ", index_str, " . \n"
"?port ", property, " ?value . \n}\n", NULL);
- rasqal_query_results* results = slv2_plugin_run_query(p, query);
+ SLV2Property result = slv2_query_get_results(p, query, "value");
- SLV2Property result = slv2_query_get_results(results, "value");
-
- rasqal_free_query_results(results);
- rasqal_finish();
free(query);
return result;
@@ -103,7 +96,6 @@ char*
slv2_port_get_symbol(SLV2Plugin* p,
uint32_t index)
{
- // FIXME: leaks
char* result = NULL;
SLV2Property prop