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
f67df844
Commit
f67df844
authored
Mar 03, 2012
by
gwenn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix CommitHook return type.
parent
2e131839
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
hook.go
hook.go
+3
-2
trace_test.go
trace_test.go
+2
-2
No files found.
hook.go
View file @
f67df844
...
...
@@ -17,7 +17,8 @@ import (
"unsafe"
)
type
CommitHook
func
(
udp
interface
{})
int
// If the callback on a commit hook function returns true, then the commit is converted into a rollback.
type
CommitHook
func
(
udp
interface
{})
bool
type
sqliteCommitHook
struct
{
f
CommitHook
...
...
@@ -27,7 +28,7 @@ type sqliteCommitHook struct {
//export goXCommitHook
func
goXCommitHook
(
udp
unsafe
.
Pointer
)
C
.
int
{
arg
:=
(
*
sqliteCommitHook
)(
udp
)
return
C
.
int
(
arg
.
f
(
arg
.
udp
))
return
btoc
int
(
arg
.
f
(
arg
.
udp
))
}
// Commit notification callback
...
...
trace_test.go
View file @
f67df844
...
...
@@ -28,9 +28,9 @@ func progressHandler(d interface{}) bool {
return
false
}
func
commitHook
(
d
interface
{})
int
{
func
commitHook
(
d
interface
{})
bool
{
fmt
.
Printf
(
"%s
\n
"
,
d
)
return
0
return
false
}
func
rollbackHook
(
d
interface
{})
{
...
...
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