summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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(),