From ebff8b87c7b892c60d920f54fd8d7730d9e98d34 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Thu, 21 Jul 2016 12:05:07 -0400 Subject: [PATCH 1/2] Enable CI and perform mininal checks with 'valac' --- .travis.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..56f6138 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,16 @@ +dist: trusty + +language: c + +compiler: + - gcc + +before_install: + - sudo add-apt-repository --yes ppa:vala-team + - sudo apt-get update --quiet + - sudo apt-get install --yes valac + +script: + - echo 'public int main (string[] args) { return 0; }' > test.vala + - valac $(ls | grep -P '(? Date: Thu, 21 Jul 2016 12:19:53 -0400 Subject: [PATCH 2/2] Fix warnings and errors detected from the 'valac' check --- cairosdl.deps | 2 ++ ctpl.deps | 1 + libmemcached.vapi | 4 ++-- libmemcachedutil.vapi | 6 +++--- sdl2-windows.vapi | 2 +- xcb.vapi | 14 +++++++------- 6 files changed, 16 insertions(+), 13 deletions(-) create mode 100644 cairosdl.deps create mode 100644 ctpl.deps diff --git a/cairosdl.deps b/cairosdl.deps new file mode 100644 index 0000000..c12ec46 --- /dev/null +++ b/cairosdl.deps @@ -0,0 +1,2 @@ +cairo +sdl diff --git a/ctpl.deps b/ctpl.deps new file mode 100644 index 0000000..cd10dfd --- /dev/null +++ b/ctpl.deps @@ -0,0 +1 @@ +gio-2.0 diff --git a/libmemcached.vapi b/libmemcached.vapi index 8d10a96..bfb46d6 100644 --- a/libmemcached.vapi +++ b/libmemcached.vapi @@ -193,7 +193,7 @@ namespace Memcached { [CCode (array_length_pos = 2.5, array_length_type = "size_t")] public uint8[]? get_by_key ([CCode (array_length_type = "size_t")] uint8[] group_key, [CCode (array_length_type = "size_t")] uint8[] key, out uint32 flags, out Memcached.ReturnCode error); public Memcached.ReturnCode mget_by_key ([CCode (array_length_type = "size_t")] uint8[] group_key, [CCode (array_length_type = "size_t", array_length_pos = 3.5)] uint8*[] keys, [CCode (array_length = false)] size_t[] keys_length); - [Deprecated (since = "0.50", replacement = "fetch_result"), CCode (array_length_pos = 1.5, array_length_type = "size_t")] + [Version (deprecated = true, deprecated_since = "0.50", replacement = "fetch_result"), CCode (array_length_pos = 1.5, array_length_type = "size_t")] public uint8[]? fetch ([CCode (array_length_type = "size_t")] uint8[] key, out uint32 flags, out Memcached.ReturnCode error); public Memcached.Result? fetch_result (Memcached.Result? result, out Memcached.ReturnCode error); [CCode (cname = "memcached_mget_execute")] @@ -492,7 +492,7 @@ namespace Memcached { } // parse.h - [Deprecated (since = "0.39", replacement = "Context.from_configuration")] + [Version (deprecated = true, deprecated_since = "0.39", replacement = "Context.from_configuration")] public Memcached.ServerList servers_parse (string server_strings); // server.h diff --git a/libmemcachedutil.vapi b/libmemcachedutil.vapi index 96914ca..fce2530 100644 --- a/libmemcachedutil.vapi +++ b/libmemcachedutil.vapi @@ -3,11 +3,11 @@ namespace Memcached { public class Pool { [CCode (cname = "memcached_pool")] public Pool ([CCode (array_length_type = "size_t")] uint8[] option_string); - [Deprecated (since = "0.46", replacement = "Pool"), CCode (cname = "memcached_pool_create")] + [Version (deprecated = true, deprecated_since = "0.46", replacement = "Pool"), CCode (cname = "memcached_pool_create")] public Pool.from_context (Memcached.Context mmc, uint32 initial, uint32 max); - [Deprecated (since = "0.53", replacement = "fetch")] + [Version (deprecated = true, deprecated_since = "0.53", replacement = "fetch")] public unowned Memcached.Context pop (bool block, out Memcached.ReturnCode rc); - [Deprecated (since = "0.53", replacement = "release")] + [Version (deprecated = true, deprecated_since = "0.53", replacement = "release")] public Memcached.ReturnCode push (Memcached.Context mmc); public Memcached.ReturnCode release (Memcached.Context mmc); public unowned Memcached.Context fetch (Posix.timespec relative_time, out Memcached.ReturnCode rc); diff --git a/sdl2-windows.vapi b/sdl2-windows.vapi index a5cdbd9..4b3d70f 100644 --- a/sdl2-windows.vapi +++ b/sdl2-windows.vapi @@ -28,7 +28,7 @@ namespace SDL { /// /// Windows /// - [CCode (cname="IDirect3DDevice9", cheader="d3d9.h")] + [CCode (cname="IDirect3DDevice9", cheader_filename="d3d9.h")] [Compact] public struct IDirect3DDevice9 {} diff --git a/xcb.vapi b/xcb.vapi index aedce33..81e2bb0 100644 --- a/xcb.vapi +++ b/xcb.vapi @@ -1661,7 +1661,7 @@ namespace Xcb { } } private uint8 roots_len; - [Deprecated (since = "vala-0.26", replacement = "Xcb.Setup.screens")] + [Version (deprecated = true, deprecated_since = "vala-0.26", replacement = "Xcb.Setup.screens")] public int roots_length (); public ScreenIterator roots_iterator (); public Screen[] screens { @@ -2054,7 +2054,7 @@ namespace Xcb { OWNER_GRAB_BUTTON } - [Simple] + [SimpleType] [CCode (cname = "xcb_format_t", has_type_id = false)] public struct Format { public uint8 depth; @@ -2129,7 +2129,7 @@ namespace Xcb { return res; } } - [Deprecated (since = "vala-0.26", replacement = "Xcb.Depth.visuals")] + [Version (deprecated = true, deprecated_since = "vala-0.26", replacement = "Xcb.Depth.visuals")] public VisualTypeIterator visuals_iterator (); } @@ -2142,7 +2142,7 @@ namespace Xcb { public static void next (ref DepthIterator iter); } - [Deprecated (since = "vala-0.26", replacement = "Xcb.Depth.visuals")] + [Version (deprecated = true, deprecated_since = "vala-0.26", replacement = "Xcb.Depth.visuals")] [SimpleType] [CCode (cname = "xcb_visualtype_iterator_t", has_type_id = false)] public struct VisualTypeIterator { @@ -2152,11 +2152,11 @@ namespace Xcb { public static void next (ref VisualTypeIterator iter); } - [Deprecated (since = "vala-0.14", replacement = "Xcb.Connection")] + [Version (deprecated = true, deprecated_since = "vala-0.14", replacement = "Xcb.Connection")] public Connection connect (string? display = null, out int screen = null); - [Deprecated (since = "vala-0.14", replacement = "Xcb.Connection.create_window")] + [Version (deprecated = true, deprecated_since = "vala-0.14", replacement = "Xcb.Connection.create_window")] public VoidCookie create_window (Connection connection, uint8 depth, Window window, Window parent, int16 x, int16 y, uint16 width, uint16 height, uint16 border_width, uint16 _class, VisualID visual, uint32 value_mask, [CCode (array_length = false)] uint32[] value_list); - [Deprecated (since = "vala-0.14", replacement = "Xcb.Connection.map_window")] + [Version (deprecated = true, deprecated_since = "vala-0.14", replacement = "Xcb.Connection.map_window")] public VoidCookie map_window (Connection connection, Window window); [CCode (cname = "xcb_point_t", has_type_id = false)]