[vala] sqlite3: Cast errmsg to char** in C.
- From: Evan Nemerson <evann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] sqlite3: Cast errmsg to char** in C.
- Date: Fri, 14 May 2010 05:02:17 +0000 (UTC)
commit 65a58595c56d61bbff2afb82a64a1996566eef35
Author: Julian Andres Klode <jak jak-linux org>
Date: Thu May 13 20:42:01 2010 -0700
sqlite3: Cast errmsg to char** in C.
Vala's string out arguments are const char**, but sqlite3_exec() and
sqlite3_get_table() expect 'char**'. Add [CCode (type = "char**")] to
cast them to the wanted type, thus avoiding a warning from the C
compiler.
Fixes bug 618457.
vapi/sqlite3.vapi | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/vapi/sqlite3.vapi b/vapi/sqlite3.vapi
index edff373..801154c 100644
--- a/vapi/sqlite3.vapi
+++ b/vapi/sqlite3.vapi
@@ -29,7 +29,7 @@ namespace Sqlite {
public int busy_timeout (int ms);
public int changes ();
[CCode (cname = "sqlite3_exec")]
- public int _exec (string sql, Callback? sqlite3_callback = null, out unowned string errmsg = null);
+ public int _exec (string sql, Callback? sqlite3_callback = null, [CCode (type = "char**")] out unowned string errmsg = null);
[CCode (cname = "_sqlite3_exec")]
public int exec (string sql, Callback? sqlite3_callback = null, out string errmsg = null) {
unowned string sqlite_errmsg;
@@ -48,7 +48,7 @@ namespace Sqlite {
public int total_changes ();
public int complete (string sql);
[CCode (cname = "sqlite3_get_table")]
- public int _get_table (string sql, [CCode (array_length = false)] out unowned string[] resultp, out int nrow, out int ncolumn, out unowned string? errmsg = null);
+ public int _get_table (string sql, [CCode (array_length = false)] out unowned string[] resultp, out int nrow, out int ncolumn, [CCode (type = "char**")] out unowned string? errmsg = null);
private static void free_table ([CCode (array_length = false)] string[] result);
[CCode (cname = "_sqlite3_get_table")]
public int get_table (string sql, out string[] resultp, out int nrow, out int ncolumn, out string? errmsg = null) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]