[vala/staging] libusb-1.0: Use a wrapper for Context.get_device_list()



commit b49b85c21affd82edbae917f5fe4439c0a0f79f7
Author: Evan Nemerson <evan coeus-group com>
Date:   Wed Jan 19 13:52:20 2011 -0800

    libusb-1.0: Use a wrapper for Context.get_device_list()
    
    See https://gitlab.gnome.org/GNOME/vala/issues/151

 vapi/libusb-1.0.vapi | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/vapi/libusb-1.0.vapi b/vapi/libusb-1.0.vapi
index a7655565c..e5ce2e7ac 100644
--- a/vapi/libusb-1.0.vapi
+++ b/vapi/libusb-1.0.vapi
@@ -402,7 +402,15 @@ namespace LibUSB {
                protected Context ();
                public static LibUSB.Error init (out Context context);
                public void set_debug (LogLevel level);
-               public ssize_t get_device_list ([CCode (array_length = false, array_null_terminated = true)] 
out Device[] list);
+               [CCode (cname = "libusb_get_device_list")]
+               public ssize_t _get_device_list ([CCode (array_length = false, array_null_terminated = true)] 
out Device[] list);
+               [CCode (cname = "_vala_libusb_get_device_list")]
+               public Device[] get_device_list () {
+                       Device[] result;
+                       var result_length = _get_device_list (out result);
+                       result.length = (int) result_length;
+                       return (owned) result;
+               }
                public DeviceHandle open_device_with_vid_pid (uint16 vendor_id, uint16 product_id);
 
                public LibUSB.Error try_lock_events ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]