[shotwell/shotwell-0.30] vapi: Fix array_length annotations



commit 8bec6e11da64abba3c4bd23d21e17bd4af5b1677
Author: Jens Georg <mail jensge org>
Date:   Sun Mar 14 22:46:26 2021 +0100

    vapi: Fix array_length annotations

 src/photos/PhotoMetadata.vala | 4 ++--
 vapi/libexif.vapi             | 2 +-
 vapi/libgphoto2.vapi          | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/photos/PhotoMetadata.vala b/src/photos/PhotoMetadata.vala
index fdda0e67..7c100c03 100644
--- a/src/photos/PhotoMetadata.vala
+++ b/src/photos/PhotoMetadata.vala
@@ -283,7 +283,7 @@ public class PhotoMetadata : MediaMetadata {
 #else
         exiv2.open_buf(buffer, length);
 #endif
-        exif = Exif.Data.new_from_data(buffer, length);
+        exif = Exif.Data.new_from_data(buffer);
         source_name = "<memory buffer %d bytes>".printf(length);
     }
     
@@ -294,7 +294,7 @@ public class PhotoMetadata : MediaMetadata {
 #if NEW_GEXIV2_API
         exiv2.from_app1_segment(buffer.get_data());
 #else
-        exif = Exif.Data.new_from_data(buffer.get_data(), buffer.get_size());
+        exif = Exif.Data.new_from_data(buffer.get_data());
 #endif
         source_name = "<app1 segment %zu bytes>".printf(buffer.get_size());
     }
diff --git a/vapi/libexif.vapi b/vapi/libexif.vapi
index 61ab36eb..b95dfb0e 100644
--- a/vapi/libexif.vapi
+++ b/vapi/libexif.vapi
@@ -79,7 +79,7 @@ namespace Exif {
         [CCode (cname="exif_data_new")]
         public Data();
         public static Data? new_from_file(string path);
-        public static Data? new_from_data(uint8 *data, size_t count);
+        public static Data? new_from_data([CCode (array_length_pos=1.1)]uint8[] data);
         public void dump();
         public void fix();
         public void foreach_content(ForeachContentFunc cb, void *user = null);
diff --git a/vapi/libgphoto2.vapi b/vapi/libgphoto2.vapi
index 2e119e89..34fc1c49 100644
--- a/vapi/libgphoto2.vapi
+++ b/vapi/libgphoto2.vapi
@@ -64,7 +64,7 @@ namespace GPhoto {
         public Result set_port_info(PortInfo info);
         public Result get_abilities(out CameraAbilities abilities);
         public Result set_abilities(CameraAbilities abilities);
-        public Result get_storageinfo([CCode (array_length_pos=1)]out CameraStorageInformation[] sifs, 
Context context);
+        public Result get_storageinfo([CCode (array_length_pos=1.1)]out CameraStorageInformation[] sifs, 
Context context);
         
         // Folders
         [CCode (cname="gp_camera_folder_list_folders")]
@@ -107,7 +107,7 @@ namespace GPhoto {
         [CCode (cname="gp_file_new_from_fd")]
         public static Result create_from_fd(out CameraFile file, int fd);
         [CCode (cname="gp_file_get_data_and_size")]
-        public Result get_data([CCode (array_length_pos=1)]out unowned uint8[] data);
+        public Result get_data([CCode (array_length_pos=1.1, array_length_type="gulong")]out unowned uint8[] 
data);
         public Result save(string filename);
         public Result slurp(uint8[] data, out size_t readlen);
     }


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