summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKilian Ulrichsohn <gustavfb@yahoo.de>2020-11-09 13:45:24 +0100
committerDavid Robillard <d@drobilla.net>2020-12-01 13:19:58 +0100
commit9f1c5cb43a908e6dbf9d2901608831de480fd7e1 (patch)
treef04baa773f2eef25996a81f3388655276c099c8a
parent51f729b55621979af7291cb791cda70e8accefbe (diff)
downloadlilv-master.tar.gz
lilv-master.tar.bz2
lilv-master.zip
Python: Allow connecting ports to structuresHEADmaster
-rw-r--r--NEWS3
-rw-r--r--bindings/python/lilv.py4
2 files changed, 6 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 4cdd86c..89852d6 100644
--- a/NEWS
+++ b/NEWS
@@ -1,9 +1,10 @@
lilv (0.24.11) unstable;
+ * Allow connecting ports to structures in Python
* Fix potential memory error when joining filesystem paths
* Fix unlikely undefined behavior when saving state
- -- David Robillard <d@drobilla.net> Wed, 11 Nov 2020 16:12:07 +0000
+ -- David Robillard <d@drobilla.net> Tue, 01 Dec 2020 12:19:48 +0000
lilv (0.24.10) stable;
diff --git a/bindings/python/lilv.py b/bindings/python/lilv.py
index 45b8e05..2a7614f 100644
--- a/bindings/python/lilv.py
+++ b/bindings/python/lilv.py
@@ -1460,6 +1460,10 @@ class Instance(Structure):
self.get_descriptor().connect_port(
self.get_handle(), port_index, data
)
+ elif isinstance(data, Structure):
+ self.get_descriptor().connect_port(
+ self.get_handle(), port_index, cast(byref(data), c_void_p)
+ )
elif type(data) == numpy.ndarray:
self.get_descriptor().connect_port(
self.get_handle(),