Commit bd462401 authored by gwenn's avatar gwenn

Fix go vet warning.

parent 4d6710be
...@@ -45,7 +45,7 @@ func goMInit(db, pClientData unsafe.Pointer, argc int, argv **C.char, pzErr **C. ...@@ -45,7 +45,7 @@ func goMInit(db, pClientData unsafe.Pointer, argc int, argv **C.char, pzErr **C.
} }
args := make([]string, argc) args := make([]string, argc)
var A []*C.char var A []*C.char
slice := reflect.SliceHeader{uintptr(unsafe.Pointer(argv)), argc, argc} slice := reflect.SliceHeader{Data: uintptr(unsafe.Pointer(argv)), Len: argc, Cap: argc}
a := reflect.NewAt(reflect.TypeOf(A), unsafe.Pointer(&slice)).Elem().Interface() a := reflect.NewAt(reflect.TypeOf(A), unsafe.Pointer(&slice)).Elem().Interface()
for i, s := range a.([]*C.char) { for i, s := range a.([]*C.char) {
args[i] = C.GoString(s) args[i] = C.GoString(s)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment