aboutsummaryrefslogtreecommitdiff
path: root/sqlite3.go
diff options
context:
space:
mode:
authorKevin Burke <kev@inburke.com>2018-11-01 18:03:02 -1000
committerKevin Burke <kev@inburke.com>2018-11-01 20:42:26 -1000
commit6a26e21416755035b3c77e9c299b9a040f414b4c (patch)
tree44ea93e2c36d8decc46e4428f45db02056bee44b /sqlite3.go
parentMerge pull request #655 from typeless/fix-too-large-arrary-error-v2 (diff)
downloadgolite-6a26e21416755035b3c77e9c299b9a040f414b4c.tar.gz
golite-6a26e21416755035b3c77e9c299b9a040f414b4c.tar.xz
all: fix cgo compile failures on tip
Apparently the cgo typechecks get better on tip, so use C.int instead of Go integers. Build tip as part of the Travis build, so we can ensure that any errors are resolved before they get released to a wider audience.
Diffstat (limited to 'sqlite3.go')
-rw-r--r--sqlite3.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/sqlite3.go b/sqlite3.go
index 942b0b5..d75e8b0 100644
--- a/sqlite3.go
+++ b/sqlite3.go
@@ -1674,7 +1674,7 @@ func (c *SQLiteConn) prepare(ctx context.Context, query string) (driver.Stmt, er
defer C.free(unsafe.Pointer(pquery))
var s *C.sqlite3_stmt
var tail *C.char
- rv := C._sqlite3_prepare_v2_internal(c.db, pquery, -1, &s, &tail)
+ rv := C._sqlite3_prepare_v2_internal(c.db, pquery, C.int(-1), &s, &tail)
if rv != C.SQLITE_OK {
return nil, c.lastError()
}
@@ -1718,7 +1718,7 @@ func (c *SQLiteConn) GetFilename(schemaName string) string {
// GetLimit returns the current value of a run-time limit.
// See: sqlite3_limit, http://www.sqlite.org/c3ref/limit.html
func (c *SQLiteConn) GetLimit(id int) int {
- return int(C._sqlite3_limit(c.db, C.int(id), -1))
+ return int(C._sqlite3_limit(c.db, C.int(id), C.int(-1)))
}
// SetLimit changes the value of a run-time limits.