[vala-extra-vapis] Fix several syntax and semantic errors
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala-extra-vapis] Fix several syntax and semantic errors
- Date: Tue, 15 Jan 2019 22:15:53 +0000 (UTC)
commit 34bc6d7446bae32ff03d258ed8de59620ca22141
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Tue Jan 15 23:13:18 2019 +0100
Fix several syntax and semantic errors
OpenCL.vapi | 2 +-
aubio.vapi | 2 +-
cups.vapi | 2 +-
libsodium.vapi | 8 ++++----
opencv.vapi | 6 +++---
sane-backends.vapi | 9 +++++++--
sdl2.vapi | 2 +-
7 files changed, 18 insertions(+), 13 deletions(-)
---
diff --git a/OpenCL.vapi b/OpenCL.vapi
index d577385..93c8bff 100644
--- a/OpenCL.vapi
+++ b/OpenCL.vapi
@@ -733,7 +733,7 @@ public int GetSamplerInfo(Sampler sampler,
public Program CreateProgramWithSource(Context context,
uint count,
[CCode (array_length = false)]
- char[][] strings,
+ char[,] strings,
[CCode (array_length = false)]
size_t[] lengths,
out ErrorCode errcode_ret);
diff --git a/aubio.vapi b/aubio.vapi
index 128650a..99a8f84 100644
--- a/aubio.vapi
+++ b/aubio.vapi
@@ -41,7 +41,7 @@ namespace Aubio {
public Fvector(Uint length, Uint channels);
public Uint channels;
[CCode (array_length_cname = "length")]
- public Sample[][] data; /* length * channels */
+ public Sample[,] data; /* length * channels */
}
[Compact]
diff --git a/cups.vapi b/cups.vapi
index 33a7efc..3cb0e41 100644
--- a/cups.vapi
+++ b/cups.vapi
@@ -303,7 +303,7 @@ namespace CUPS {
public float density;
public float gamma;
[CCode (array_length = false)]
- public float[][] matrix;
+ public float[,] matrix;
}
[CCode (cname = "ppd_cptype_t", cprefix = "PPD_CUSTOM_")]
diff --git a/libsodium.vapi b/libsodium.vapi
index 7e0b7eb..e177e4e 100644
--- a/libsodium.vapi
+++ b/libsodium.vapi
@@ -29,7 +29,7 @@ namespace Sodium {
[CCode (lower_case_cprefix = "randombytes_")]
namespace Random {
[CCode (cname = "randombytes_random")]
- public static uint32 random (uint32 upper_bound = 0xffffffff);
+ public static uint32 random (uint32 upper_bound = 0xffffffffU);
public static void buffer (uint8[] buf);
public static int close ();
public static int stir ();
@@ -37,12 +37,12 @@ namespace Sodium {
namespace Sign {
[CCode (cname = "crypto_sign_PUBLICKEYBYTES")]
- public static size_t PUBLIC_KEY_BYTES;
+ public const size_t PUBLIC_KEY_BYTES;
[CCode (cname = "crypto_sign_SECRETKEYBYTES")]
- public static size_t SECRET_KEY_BYTES;
+ public const size_t SECRET_KEY_BYTES;
[CCode (cname = "crypto_sign_keypair")]
- public static int key_pair (uint8[Sodium.Sign.PUBLIC_KEY_BYTES] public_key,
uint8[Sodium.Sign.SECRET_KEY_BYTES] secret_key);
+ public static int key_pair (uint8 public_key[Sodium.Sign.PUBLIC_KEY_BYTES], uint8
secret_key[Sodium.Sign.SECRET_KEY_BYTES]);
}
public static int init ();
diff --git a/opencv.vapi b/opencv.vapi
index a667a6a..36a3f1f 100644
--- a/opencv.vapi
+++ b/opencv.vapi
@@ -163,9 +163,9 @@ namespace OpenCV {
[CCode (cname = "cvFillConvexPoly")]
public void fill_convex_polygon (OpenCV.Point[] pts, OpenCV.Scalar color, int line_type = 8,
int shift = 0);
[CCode (cname = "cvFillPoly")]
- public void fill_polygon ([CCode (array_length = false)] OpenCV.Point[][] pts, [CCode
(array_length = false)] int[] npts, int contours, OpenCV.Scalar color, int line_type = 8, int shift = 0);
+ public void fill_polygon ([CCode (array_length = false)] OpenCV.Point[,] pts, [CCode
(array_length = false)] int[] npts, int contours, OpenCV.Scalar color, int line_type = 8, int shift = 0);
[CCode (cname = "cvPolyLine")]
- public void poly_line ([CCode (array_length = false)] OpenCV.Point[][] pts, [CCode
(array_length = false)] int[] npts, int contours, int is_closed, OpenCV.Scalar color, int thickness = 1, int
line_type = 8, int shift = 0);
+ public void poly_line ([CCode (array_length = false)] OpenCV.Point[,] pts, [CCode
(array_length = false)] int[] npts, int contours, int is_closed, OpenCV.Scalar color, int thickness = 1, int
line_type = 8, int shift = 0);
[CCode (cname = "cvSegmentImage", cheader_filename = "cvaux.h")]
public OpenCV.Sequence segment_image (OpenCV.Array dstarr, double canny_threshhold, double
ffill_threshhold, OpenCV.Memory.Storage storage);
[CCode (cname = "cvConvert")]
@@ -232,7 +232,7 @@ namespace OpenCV {
[CCode (array_length_cname = "num_states")]
public float[] transP;
[CCode (array_length = false)]
- public float[][] obsProb;
+ public float[,] obsProb;
public OpenCV.EHMM.StateInfo u;
[Compact, CCode (cname = "CvEHMMState")]
diff --git a/sane-backends.vapi b/sane-backends.vapi
index bb151d8..bd38411 100644
--- a/sane-backends.vapi
+++ b/sane-backends.vapi
@@ -256,11 +256,16 @@ namespace Sane
public Status get_select_fd(out Int fd);
}
+ [CCode(cname="SANE_MAX_USERNAME_LEN")]
+ public const int MAX_USERNAME_LEN;
+ [CCode(cname="SANE_MAX_PASSWORD_LEN")]
+ public const int MAX_PASSWORD_LEN;
+
[CCode(cname="SANE_Authorization_Callback", has_target = false)]
public delegate void AuthorizationCallback(
StringConst resource,
- [CCode(array_length_cexpr="SANE_MAX_USERNAME_LEN")]Char username[],
- [CCode(array_length_cexpr="SANE_MAX_PASSWORD_LEN")]Char password[]
+ Char username[Sane.MAX_USERNAME_LEN],
+ Char password[Sane.MAX_PASSWORD_LEN]
);
public Status init(out Int version_code, AuthorizationCallback? authorize);
diff --git a/sdl2.vapi b/sdl2.vapi
index 61586aa..66f14b4 100644
--- a/sdl2.vapi
+++ b/sdl2.vapi
@@ -3573,7 +3573,7 @@ namespace SDL {
public unowned AudioFunc callback;
}// AudioSpec
- [CCode (cname = "SDL_AudioFilter", instance_pos = 0.1, cheader_filename = "SDL2/SDL_audio.h")]
+ [CCode (cname = "SDL_AudioFilter", has_target = false, cheader_filename = "SDL2/SDL_audio.h")]
public delegate void AudioFilter (AudioConverter cvt, AudioFormat format);
[CCode (cname = "SDL_AudioCVT", cheader_filename = "SDL2/SDL_audio.h")]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]