summaryrefslogtreecommitdiffstats
path: root/swig/slv2.i
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-03-12 00:11:17 +0000
committerDavid Robillard <d@drobilla.net>2008-03-12 00:11:17 +0000
commit49ddf1af831493cb34a44c35781f3323916314af (patch)
tree957277e4b3928cae3c715b01ac102e24a2ee7ea4 /swig/slv2.i
parentb18d8d7790072058940ddbab21afb9c0e3da7f95 (diff)
downloadlilv-49ddf1af831493cb34a44c35781f3323916314af.tar.gz
lilv-49ddf1af831493cb34a44c35781f3323916314af.tar.bz2
lilv-49ddf1af831493cb34a44c35781f3323916314af.zip
Sorta workingish chicken scheme bindings.
git-svn-id: http://svn.drobilla.net/lad/slv2@1164 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'swig/slv2.i')
-rw-r--r--swig/slv2.i5
1 files changed, 3 insertions, 2 deletions
diff --git a/swig/slv2.i b/swig/slv2.i
index 210da6e..5bc9a5d 100644
--- a/swig/slv2.i
+++ b/swig/slv2.i
@@ -67,8 +67,8 @@ typedef struct { SLV2World world; SLV2Plugins me; } Plugins;
}
inline unsigned size() const { return slv2_plugins_size($self->me); }
- inline unsigned __len__() const { return slv2_plugins_size($self->me); }
+#ifdef PYTHON
Plugin* __getitem__(unsigned i) {
if (i < slv2_plugins_size($self->me))
return new_Plugin(slv2_plugins_get_at($self->me, i));
@@ -76,7 +76,8 @@ typedef struct { SLV2World world; SLV2Plugins me; } Plugins;
return NULL;
}
-#ifdef PYTHON
+ inline unsigned __len__() const { return slv2_plugins_size($self->me); }
+
%pythoncode %{
def __iter__(self):
class Iterator(object):