From e63ddcaa1aafbeabdee791f420a5148326cfd351 Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Thu, 8 Sep 2016 01:00:00 +0900 Subject: [PATCH] wrapper is not needress when not use libsqlite3 --- tracecallback.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tracecallback.go b/tracecallback.go index 01923f2..bf222b5 100644 --- a/tracecallback.go +++ b/tracecallback.go @@ -17,12 +17,6 @@ package sqlite3 void stepTrampoline(sqlite3_context*, int, sqlite3_value**); void doneTrampoline(sqlite3_context*); - -int -_sqlite3_trace_v2(sqlite3* db, unsigned mask, int(*xc)(unsigned,void*,void*,void*), void *ctx) { - return sqlite3_trace_v2(db, mask, xc, ctx); -} - void traceCallbackTrampoline(unsigned traceEventCode, void *ctx, void *p, void *x); */ import "C" @@ -408,7 +402,7 @@ func (c *SQLiteConn) SetTrace(requested *TraceConfig) error { } func (c *SQLiteConn) setSQLiteTrace(sqliteEventMask uint) error { - rv := C._sqlite3_trace_v2(c.db, + rv := C.sqlite3_trace_v2(c.db, C.uint(sqliteEventMask), (*[0]byte)(unsafe.Pointer(C.traceCallbackTrampoline)), unsafe.Pointer(c.db)) // Fourth arg is same as first: we are