diff options
| author | xengineering <me@xengineering.eu> | 2024-02-15 20:35:21 +0100 | 
|---|---|---|
| committer | xengineering <me@xengineering.eu> | 2024-02-15 20:35:21 +0100 | 
| commit | 38ee758c3d553faae683169eb74f2e6de0ab4207 (patch) | |
| tree | 95009151b40901466fc7524e13feaddf9eb51528 /vendor/github.com/mattn/go-sqlite3/callback.go | |
| parent | bfd936ab717c6d4e4e50bbd0f797c3d1fc7eda42 (diff) | |
| download | ceres-38ee758c3d553faae683169eb74f2e6de0ab4207.tar ceres-38ee758c3d553faae683169eb74f2e6de0ab4207.tar.zst ceres-38ee758c3d553faae683169eb74f2e6de0ab4207.zip | |
Update github.com/mattn/go-sqlite3 to v1.14.22
Diffstat (limited to 'vendor/github.com/mattn/go-sqlite3/callback.go')
| -rw-r--r-- | vendor/github.com/mattn/go-sqlite3/callback.go | 16 | 
1 files changed, 8 insertions, 8 deletions
| diff --git a/vendor/github.com/mattn/go-sqlite3/callback.go b/vendor/github.com/mattn/go-sqlite3/callback.go index d305691..b794bcd 100644 --- a/vendor/github.com/mattn/go-sqlite3/callback.go +++ b/vendor/github.com/mattn/go-sqlite3/callback.go @@ -100,13 +100,13 @@ func preUpdateHookTrampoline(handle unsafe.Pointer, dbHandle uintptr, op int, db  // Use handles to avoid passing Go pointers to C.  type handleVal struct {  	db  *SQLiteConn -	val interface{} +	val any  }  var handleLock sync.Mutex  var handleVals = make(map[unsafe.Pointer]handleVal) -func newHandle(db *SQLiteConn, v interface{}) unsafe.Pointer { +func newHandle(db *SQLiteConn, v any) unsafe.Pointer {  	handleLock.Lock()  	defer handleLock.Unlock()  	val := handleVal{db: db, val: v} @@ -124,7 +124,7 @@ func lookupHandleVal(handle unsafe.Pointer) handleVal {  	return handleVals[handle]  } -func lookupHandle(handle unsafe.Pointer) interface{} { +func lookupHandle(handle unsafe.Pointer) any {  	return lookupHandleVal(handle).val  } @@ -238,7 +238,7 @@ func callbackArg(typ reflect.Type) (callbackArgConverter, error) {  	switch typ.Kind() {  	case reflect.Interface:  		if typ.NumMethod() != 0 { -			return nil, errors.New("the only supported interface type is interface{}") +			return nil, errors.New("the only supported interface type is any")  		}  		return callbackArgGeneric, nil  	case reflect.Slice: @@ -360,11 +360,11 @@ func callbackRetGeneric(ctx *C.sqlite3_context, v reflect.Value) error {  	}  	cb, err := callbackRet(v.Elem().Type()) -        if err != nil { -                return err -        } +	if err != nil { +		return err +	} -        return cb(ctx, v.Elem()) +	return cb(ctx, v.Elem())  }  func callbackRet(typ reflect.Type) (callbackRetConverter, error) { | 
