Commit 8626349d authored by gwenn's avatar gwenn

Fix regression with go tip: ld: illegal text-relocation to '_free'

parent 5abcca4a
......@@ -394,8 +394,7 @@ func (s *Stmt) BindByIndex(index int, value interface{}) error {
rv = C.sqlite3_bind_int64(s.stmt, i, C.sqlite3_int64(value.Unix()))
} else {
v := value.Format(s.c.DefaultTimeLayout)
f := C.sqlite3_destructor_type(C.free)
rv = C.sqlite3_bind_text(s.stmt, i, C.CString(v), C.int(len(v)), f)
rv = C.my_bind_text(s.stmt, i, C.CString(v), C.int(len(v)))
}
case ZeroBlobLength:
rv = C.sqlite3_bind_zeroblob(s.stmt, i, C.int(value))
......@@ -421,8 +420,7 @@ func (s *Stmt) BindReflect(index int, value interface{}) error {
switch v.Kind() {
case reflect.String:
vs := v.String() // TODO NullIfEmptyString
f := C.sqlite3_destructor_type(C.free)
rv = C.sqlite3_bind_text(s.stmt, i, C.CString(vs), C.int(len(vs)), f)
rv = C.my_bind_text(s.stmt, i, C.CString(vs), C.int(len(vs)))
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
rv = C.sqlite3_bind_int64(s.stmt, i, C.sqlite3_int64(v.Int()))
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
......
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