]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
rest-0.7: Fix some ownership problems
authorRico Tzschichholz <ricotz@ubuntu.com>
Sat, 1 Oct 2016 11:58:03 +0000 (13:58 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sat, 1 Oct 2016 12:06:43 +0000 (14:06 +0200)
vapi/metadata/Rest-0.7.metadata
vapi/rest-0.7.vapi

index acffd93488124fd8c391a3b70051c76d3ddae4c8..a84f7518e7be7a98f9d0e83bf1fd88c58b59b390 100644 (file)
@@ -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
index feb975d5c4b2d0af6740ee1cabdccc2f66a51c07..ded07cee34d141e43aa390bb073dca05bacdb57f 100644 (file)
@@ -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;