[vala-extra-vapis] libgsasl: Fix the bindings for gsasl_client_start / gsasl_server_start
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala-extra-vapis] libgsasl: Fix the bindings for gsasl_client_start / gsasl_server_start
- Date: Wed, 30 Jan 2019 15:58:26 +0000 (UTC)
commit e4e5a4eb02d9a647dadffe1c95160f3dc3bfb950
Author: Jelmer Vernooij <jelmer google com>
Date: Tue Jan 29 20:15:43 2019 +0000
libgsasl: Fix the bindings for gsasl_client_start / gsasl_server_start
Prevent double free of GSasl_Session objects.
libgsasl.vapi | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
---
diff --git a/libgsasl.vapi b/libgsasl.vapi
index 6cb3e9a..723d221 100644
--- a/libgsasl.vapi
+++ b/libgsasl.vapi
@@ -121,7 +121,8 @@ namespace Gsasl {
ALLOW_UNASSIGNED
}
- [Compact, CCode (cname = "Gsasl", lower_case_cprefix = "gsasl_", destroy_function = "gsasl_done")]
+ [Compact]
+ [CCode (cname = "Gsasl", lower_case_cprefix = "gsasl_", free_function = "gsasl_done",
has_copy_function = false)]
public class Context {
private Context ();
public static Gsasl.Result init (out Gsasl.Context ctx);
@@ -146,15 +147,13 @@ namespace Gsasl {
public Gsasl.Result server_mechlist (out string mechlist);
public Gsasl.Result server_support_p (string name);
- public Gsasl.Result client_start (string mech);
- public Gsasl.Result server_start ();
+ public Gsasl.Result client_start (string mech, out Session? session);
+ public Gsasl.Result server_start (string mech, out Session? session);
}
- [CCode (cname = "Gsasl_session", lower_case_cprefix = "gsasl_", destroy_function = "gsasl_finish")]
- public struct Session {
- [CCode (cname = "gsasl_client_start", instance_pos = -1)]
- public Session (Gsasl.Context context, string mech);
-
+ [Compact]
+ [CCode (cname = "Gsasl_session", lower_case_cprefix = "gsasl_", free_function = "gsasl_finish",
has_copy_function = false)]
+ public class Session {
public void* hook {
[CCode (cname = "gsasl_session_hook_set")] get;
[CCode (cname = "gsasl_session_hook_get")] set;
@@ -174,7 +173,7 @@ namespace Gsasl {
public unowned string get_property_fast (Gsasl.Property prop);
public Gsasl.Result step ([CCode (array_length_type = "size_t")] uint[] input, [CCode
(array_length_type = "size_t")] out uint8[] output);
- public Gsasl.Result step64 (string b64input, out string b64output);
+ public Gsasl.Result step64 (string? b64input, out string b64output);
public Gsasl.Result encode ([CCode (array_length_type = "size_t")] uint8[] input, [CCode
(array_length_type = "size_t")] out uint8[] output);
public Gsasl.Result decode ([CCode (array_length_type = "size_t")] uint8[] input, [CCode
(array_length_type = "size_t")] out uint8[] output);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]