@@ -336,7 +336,7 @@ func (c *SQLiteConn) RegisterCommitHook(callback func() int) {
336
336
if callback == nil {
337
337
C .sqlite3_commit_hook (c .db , nil , nil )
338
338
} else {
339
- C .sqlite3_commit_hook (c .db , (* [0 ]byte )(unsafe . Pointer ( C .commitHookTrampoline ) ), unsafe .Pointer (newHandle (c , callback )))
339
+ C .sqlite3_commit_hook (c .db , (* [0 ]byte )(C .commitHookTrampoline ), unsafe .Pointer (newHandle (c , callback )))
340
340
}
341
341
}
342
342
@@ -349,7 +349,7 @@ func (c *SQLiteConn) RegisterRollbackHook(callback func()) {
349
349
if callback == nil {
350
350
C .sqlite3_rollback_hook (c .db , nil , nil )
351
351
} else {
352
- C .sqlite3_rollback_hook (c .db , (* [0 ]byte )(unsafe . Pointer ( C .rollbackHookTrampoline ) ), unsafe .Pointer (newHandle (c , callback )))
352
+ C .sqlite3_rollback_hook (c .db , (* [0 ]byte )(C .rollbackHookTrampoline ), unsafe .Pointer (newHandle (c , callback )))
353
353
}
354
354
}
355
355
@@ -366,7 +366,7 @@ func (c *SQLiteConn) RegisterUpdateHook(callback func(int, string, string, int64
366
366
if callback == nil {
367
367
C .sqlite3_update_hook (c .db , nil , nil )
368
368
} else {
369
- C .sqlite3_update_hook (c .db , (* [0 ]byte )(unsafe . Pointer ( C .updateHookTrampoline ) ), unsafe .Pointer (newHandle (c , callback )))
369
+ C .sqlite3_update_hook (c .db , (* [0 ]byte )(C .updateHookTrampoline ), unsafe .Pointer (newHandle (c , callback )))
370
370
}
371
371
}
372
372
@@ -448,7 +448,7 @@ func (c *SQLiteConn) RegisterFunc(name string, impl interface{}, pure bool) erro
448
448
}
449
449
450
450
func sqlite3CreateFunction (db * C.sqlite3 , zFunctionName * C.char , nArg C.int , eTextRep C.int , pApp uintptr , xFunc unsafe.Pointer , xStep unsafe.Pointer , xFinal unsafe.Pointer ) C.int {
451
- return C ._sqlite3_create_function (db , zFunctionName , nArg , eTextRep , C .uintptr_t (pApp ), (* [0 ]byte )(unsafe . Pointer ( xFunc )) , (* [0 ]byte )(unsafe . Pointer ( xStep )) , (* [0 ]byte )(unsafe . Pointer ( xFinal ) ))
451
+ return C ._sqlite3_create_function (db , zFunctionName , nArg , eTextRep , C .uintptr_t (pApp ), (* [0 ]byte )(xFunc ), (* [0 ]byte )(xStep ), (* [0 ]byte )(xFinal ))
452
452
}
453
453
454
454
// AutoCommit return which currently auto commit or not.
@@ -859,7 +859,7 @@ func (s *SQLiteStmt) bind(args []namedValue) error {
859
859
case int64 :
860
860
rv = C .sqlite3_bind_int64 (s .s , n , C .sqlite3_int64 (v ))
861
861
case bool :
862
- if bool ( v ) {
862
+ if v {
863
863
rv = C .sqlite3_bind_int (s .s , n , 1 )
864
864
} else {
865
865
rv = C .sqlite3_bind_int (s .s , n , 0 )
@@ -1070,10 +1070,10 @@ func (rc *SQLiteRows) Next(dest []driver.Value) error {
1070
1070
n := int (C .sqlite3_column_bytes (rc .s .s , C .int (i )))
1071
1071
switch dest [i ].(type ) {
1072
1072
case sql.RawBytes :
1073
- dest [i ] = (* [1 << 30 ]byte )(unsafe . Pointer ( p ) )[0 :n ]
1073
+ dest [i ] = (* [1 << 30 ]byte )(p )[0 :n ]
1074
1074
default :
1075
1075
slice := make ([]byte , n )
1076
- copy (slice [:], (* [1 << 30 ]byte )(unsafe . Pointer ( p ) )[0 :n ])
1076
+ copy (slice [:], (* [1 << 30 ]byte )(p )[0 :n ])
1077
1077
dest [i ] = slice
1078
1078
}
1079
1079
case C .SQLITE_NULL :
0 commit comments