From d05555a6774f41e92526dc04c3514abcd9397383 Mon Sep 17 00:00:00 2001 From: mattn Date: Wed, 12 Sep 2012 11:43:37 +0900 Subject: [PATCH] workaround on windows. currently, int64 does not work correctly. --- sqlite3.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sqlite3.go b/sqlite3.go index b566d92..980cc7e 100644 --- a/sqlite3.go +++ b/sqlite3.go @@ -221,7 +221,9 @@ type SQLiteResult struct { } func (r *SQLiteResult) LastInsertId() (int64, error) { - return int64(C.sqlite3_last_insert_rowid(r.s.c.db)), nil + var rr int64 + rr = int64(C.sqlite3_last_insert_rowid(r.s.c.db)) + return rr, nil } func (r *SQLiteResult) RowsAffected() (int64, error) {