[vala] rest-0.7: Fix some ownership problems



commit 51438dd88cced3ee8ba97de82b659c88262c2f3c
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sat Oct 1 13:58:03 2016 +0200

    rest-0.7: Fix some ownership problems

 vapi/metadata/Rest-0.7.metadata |    7 +++++--
 vapi/rest-0.7.vapi              |   10 +++++-----
 2 files changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/vapi/metadata/Rest-0.7.metadata b/vapi/metadata/Rest-0.7.metadata
index acffd93..a84f751 100644
--- a/vapi/metadata/Rest-0.7.metadata
+++ b/vapi/metadata/Rest-0.7.metadata
@@ -9,8 +9,9 @@ Proxy cheader_filename="rest/rest-proxy.h"
 ProxyCall cheader_filename="rest/rest-proxy-call.h"
        .run.loop out=true default=null
        .get_params skip=false
-       .get_response_headers skip=false
+       .get_response_headers skip=false type_arguments="unowned string,unowned string"
        .add_headers skip=false
+       .add_param_full.param owned
        .add_params skip=false
        .continuous skip=false
        .upload skip=false
@@ -22,7 +23,9 @@ ProxyError cheader_filename="rest/rest-proxy.h"
 ProxyCallError cheader_filename="rest/rest-proxy-call.h"
 Param cheader_filename="rest/rest-param.h"
 Params cheader_filename="rest/rest-params.h"
-       .as_string_hash_table skip=false type_arguments="string,string"
+       .add.param owned
+       .as_string_hash_table type_arguments="unowned string,unowned string"
+       .get unowned nullable
 ParamsIter cheader_filename="rest/rest-params.h"
 XmlNode cheader_filename="rest/rest-xml-node.h"
   .ref skip=false
diff --git a/vapi/rest-0.7.vapi b/vapi/rest-0.7.vapi
index feb975d..ded07ce 100644
--- a/vapi/rest-0.7.vapi
+++ b/vapi/rest-0.7.vapi
@@ -82,11 +82,11 @@ namespace Rest {
        [CCode (cheader_filename = "rest/rest-params.h")]
        [Compact]
        public class Params {
-               public void add (Rest.Param param);
+               public void add (owned Rest.Param param);
                public bool are_strings ();
-               public GLib.HashTable<string,string> as_string_hash_table ();
+               public GLib.HashTable<weak string,weak string> as_string_hash_table ();
                public void free ();
-               public Rest.Param @get (string name);
+               public unowned Rest.Param? @get (string name);
                public void remove (string name);
        }
        [CCode (cheader_filename = "rest/rest-params.h")]
@@ -139,7 +139,7 @@ namespace Rest {
                public void add_header (string header, string value);
                public void add_headers (...);
                public void add_param (string name, string value);
-               public void add_param_full (Rest.Param param);
+               public void add_param_full (owned Rest.Param param);
                public void add_params (...);
                public bool cancel ();
                public bool continuous ([CCode (delegate_target_pos = 2.1)] Rest.ProxyCallContinuousCallback 
callback, GLib.Object weak_object) throws GLib.Error;
@@ -149,7 +149,7 @@ namespace Rest {
                public unowned Rest.Params get_params ();
                public unowned string get_payload ();
                public int64 get_payload_length ();
-               public GLib.HashTable<weak void*,weak void*> get_response_headers ();
+               public GLib.HashTable<weak string,weak string> get_response_headers ();
                public uint get_status_code ();
                public unowned string get_status_message ();
                public async bool invoke_async (GLib.Cancellable? cancellable) throws GLib.Error;


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