Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gosqlite
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gosqlite
Commits
8626349d
Commit
8626349d
authored
Dec 21, 2014
by
gwenn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix regression with go tip: ld: illegal text-relocation to '_free'
parent
5abcca4a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
stmt.go
stmt.go
+2
-4
No files found.
stmt.go
View file @
8626349d
...
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment