]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
sqlite3: Assorted memory management fixes for strings and blobs.
authorEvan Nemerson <evan@coeus-group.com>
Mon, 27 Sep 2010 20:01:41 +0000 (13:01 -0700)
committerJürg Billeter <j@bitron.ch>
Sun, 3 Oct 2010 17:29:29 +0000 (19:29 +0200)
vapi/sqlite3.vapi

index ddb81d855fba9d43f18b73b9be967e20504775a9..8f8c2dbc954f438706df98ee96f9442bb5d794bf 100644 (file)
@@ -354,11 +354,13 @@ namespace Sqlite {
                [CCode (cname = "sqlite3_stmt_status")]
                public int status (Sqlite.StatementStatus op, int resetFlg = 0);
                public int step ();
-               public int bind_blob (int index, void* value, int n, GLib.DestroyNotify destroy_notify);
+               public int bind_blob (int index, void* value, int n, GLib.DestroyNotify? destroy_notify = null);
                public int bind_double (int index, double value);
                public int bind_int (int index, int value);
                public int bind_int64 (int index, int64 value);
                public int bind_null (int index);
+               [CCode (cname = "sqlite3_bind_text")]
+               public int _bind_text (int index, string value, int n = -1, GLib.DestroyNotify? destroy_notify = null);
                public int bind_text (int index, owned string value, int n = -1, GLib.DestroyNotify destroy_notify = GLib.g_free);
                public int bind_value (int index, Value value);
                public int bind_zeroblob (int index, int n);
@@ -408,7 +410,7 @@ namespace Sqlite {
 
        [Compact, CCode (cname = "sqlite3_context", cprefix = "sqlite3_")]
        public class Context {
-               public void result_blob (uint8[] data, GLib.DestroyNotify? destroy_notify = GLib.g_free);
+               public void result_blob (owned uint8[] data, GLib.DestroyNotify? destroy_notify = GLib.g_free);
                public void result_double (double value);
                public void result_error (string value, int error_code);
                public void result_error_toobig ();
@@ -417,7 +419,7 @@ namespace Sqlite {
                public void result_int (int value);
                public void result_int64 (int64 value);
                public void result_null ();
-               public void result_text (string value, int length = -1, GLib.DestroyNotify? destroy_notify = GLib.g_free);
+               public void result_text (owned string value, int length = -1, GLib.DestroyNotify? destroy_notify = GLib.g_free);
                public void result_value (Sqlite.Value value);
                public void result_zeroblob (int n);