From 09259a5557fed04432cc35a10dd3b300ebc119e9 Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Wed, 16 Sep 2015 15:18:46 +0900 Subject: [PATCH] fix build on 32bit OSs. Close #238 --- callback.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/callback.go b/callback.go index 61fc8d1..6048f27 100644 --- a/callback.go +++ b/callback.go @@ -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) }