Skip to content

Commit

Permalink
fix build on 32bit OSs. Close #238
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn committed Sep 16, 2015
1 parent 64bb935 commit 09259a5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions callback.go
Expand Up @@ -28,14 +28,16 @@ import (

//export callbackTrampoline
func callbackTrampoline(ctx *C.sqlite3_context, argc int, argv **C.sqlite3_value) {
args := (*[1 << 30]*C.sqlite3_value)(unsafe.Pointer(argv))[:argc:argc]
// TODO should create slice dynamically?
args := (*[1 << 20]*C.sqlite3_value)(unsafe.Pointer(argv))[:argc:argc]
fi := (*functionInfo)(unsafe.Pointer(C.sqlite3_user_data(ctx)))
fi.Call(ctx, args)
}

//export stepTrampoline
func stepTrampoline(ctx *C.sqlite3_context, argc int, argv **C.sqlite3_value) {
args := (*[1 << 30]*C.sqlite3_value)(unsafe.Pointer(argv))[:argc:argc]
// TODO should create slice dynamically?
args := (*[1 << 20]*C.sqlite3_value)(unsafe.Pointer(argv))[:argc:argc]
ai := (*aggInfo)(unsafe.Pointer(C.sqlite3_user_data(ctx)))
ai.Step(ctx, args)
}
Expand Down

0 comments on commit 09259a5

Please sign in to comment.