[shotwell/wip/vapi-fixes: 3/3] Fix strings in [SimpleType] structs
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell/wip/vapi-fixes: 3/3] Fix strings in [SimpleType] structs
- Date: Sat, 13 Mar 2021 21:32:54 +0000 (UTC)
commit 1015c04c5174252c345aed2398efeef09571926d
Author: Jens Georg <mail jensge org>
Date: Sat Mar 13 22:32:17 2021 +0100
Fix strings in [SimpleType] structs
src/camera/ImportPage.vala | 5 +++--
vapi/libgphoto2.vapi | 10 +++++-----
vapi/libraw.vapi | 2 +-
3 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/src/camera/ImportPage.vala b/src/camera/ImportPage.vala
index ab24df61..6ebf2313 100644
--- a/src/camera/ImportPage.vala
+++ b/src/camera/ImportPage.vala
@@ -1410,12 +1410,13 @@ public class ImportPage : CheckerboardPage {
import_list.add(video_source);
} else {
// determine file format from type, and then from file extension
- PhotoFileFormat file_format = PhotoFileFormat.from_gphoto_type(info.file.type);
+ string file_type = (string)info.file.type;
+ PhotoFileFormat file_format = PhotoFileFormat.from_gphoto_type(file_type);
if (file_format == PhotoFileFormat.UNKNOWN) {
file_format = PhotoFileFormat.get_by_basename_extension(filename);
if (file_format == PhotoFileFormat.UNKNOWN) {
message("Skipping %s/%s: Not a supported file extension (%s)", fulldir,
- filename, info.file.type);
+ filename, file_type);
continue;
}
diff --git a/vapi/libgphoto2.vapi b/vapi/libgphoto2.vapi
index d1504116..1bb919d6 100644
--- a/vapi/libgphoto2.vapi
+++ b/vapi/libgphoto2.vapi
@@ -159,7 +159,7 @@ namespace GPhoto {
public CameraFileInfoFields fields;
public CameraFileStatus status;
public ulong size;
- public string type;
+ public char type[64];
public uint width;
public uint height;
public CameraFilePermissions permissions;
@@ -175,7 +175,7 @@ namespace GPhoto {
public CameraFileInfoFields fields;
public CameraFileStatus status;
public ulong size;
- public string type;
+ public char type[64];
public uint width;
public uint height;
}
@@ -310,9 +310,9 @@ namespace GPhoto {
)]
public struct CameraStorageInformation {
public CameraStorageInfoFields fields;
- public string basedir;
- public string label;
- public string description;
+ public char basedir[256];
+ public char label[256];
+ public char description[256];
public int type;
public int fstype;
public int access;
diff --git a/vapi/libraw.vapi b/vapi/libraw.vapi
index b1b5875b..146f447e 100644
--- a/vapi/libraw.vapi
+++ b/vapi/libraw.vapi
@@ -248,7 +248,7 @@ public struct Thumbnail {
public uint tlength;
public int tcolors;
[CCode (array_length_cname="tlength")]
- public uint8[] thumb;
+ public unowned uint8[] thumb;
}
[CCode (cname="enum LibRaw_thumbnail_formats", cprefix="LIBRAW_THUMBNAIL_")]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]