Browse Source

Python: Allow connecting ports to structures

add_opts_to_lv2apply
Kilian Ulrichsohn 12 months ago
committed by David Robillard
parent
commit
9f1c5cb43a
  1. 3
      NEWS
  2. 4
      bindings/python/lilv.py

3
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;

4
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(),

Loading…
Cancel
Save