diff options
author | David Robillard <d@drobilla.net> | 2012-11-23 03:39:05 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-11-23 03:39:05 +0000 |
commit | c28f70ab84dcbc2a185b1dc9577ea97cb1042701 (patch) | |
tree | 8c23c46c9d7f8ea958c0220de24e9ed2d1127531 /lilv/lilvmm.hpp | |
parent | a76bd27ee0a9e763654100b584b3506f4f53e0c0 (diff) | |
download | lilv-c28f70ab84dcbc2a185b1dc9577ea97cb1042701.tar.gz lilv-c28f70ab84dcbc2a185b1dc9577ea97cb1042701.tar.bz2 lilv-c28f70ab84dcbc2a185b1dc9577ea97cb1042701.zip |
Add va_list variant of lilv_plugin_get_num_ports_of_class() (#758).
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@4858 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'lilv/lilvmm.hpp')
-rw-r--r-- | lilv/lilvmm.hpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lilv/lilvmm.hpp b/lilv/lilvmm.hpp index 67fbbc4..2ce29f8 100644 --- a/lilv/lilvmm.hpp +++ b/lilv/lilvmm.hpp @@ -206,10 +206,15 @@ struct Plugin { me, min_values, max_values, def_values); } - inline unsigned get_num_ports_of_class(LilvNode* class_1, - LilvNode* class_2) { - // TODO: varargs - return lilv_plugin_get_num_ports_of_class(me, class_1, class_2, NULL); + inline unsigned get_num_ports_of_class(LilvNode* class_1, ...) { + va_list args; + va_start(args, class_1); + + const uint32_t count = lilv_plugin_get_num_ports_of_class_va( + me, class_1, args); + + va_end(args); + return count; } const LilvPlugin* me; |