Skip to content
Snippets Groups Projects
Commit 53358eb4 authored by Kenneth Shaw's avatar Kenneth Shaw Committed by Manish R Jain
Browse files

Fixing go1.7 compatability issues (#122)

parent f7c8ec85
No related branches found
No related tags found
No related merge requests found
language: go
go:
- 1.6
# - tip # broken for 1.7
- tip
sudo: false
#notifications:
# slack:
......
......@@ -67,7 +67,7 @@ func (self *List) Pop() (rval Thing, ok bool) {
/*
Each will run i on each element.
It returns true if the iteration was interrupted.
This is the case when one of the ListIterator calls returned true, indicating
the iteration should be stopped.
......@@ -113,8 +113,8 @@ type element struct {
/*
The next element in the list. If this pointer has the deleted flag set it means THIS element, not the next one, is deleted.
*/
unsafe.Pointer
value Thing
Pointer unsafe.Pointer
value Thing
}
func (self *element) next() *element {
......@@ -122,7 +122,7 @@ func (self *element) next() *element {
for next != nil {
nextElement := (*element)(next)
/*
If our next element contains &deletedElement that means WE are deleted, and
If our next element contains &deletedElement that means WE are deleted, and
we can just return the next-next element. It will make it impossible to add
stuff to us, since we will always lie about our next(), but then again, deleted
elements shouldn't get new children anyway.
......
package gotomic
import (
"bytes"
"fmt"
"sort"
"sync/atomic"
"bytes"
"unsafe"
)
......@@ -32,7 +32,7 @@ type Handle struct {
/*
Will point to a version.
*/
unsafe.Pointer
Pointer unsafe.Pointer
}
/*
......@@ -101,10 +101,10 @@ func (self writes) Less(i, j int) bool {
It has a few tweaks that I don't believe break it (but I haven't even tried proving it):
1) It has an ever increasing counter for the last transaction to commit.
1) It has an ever increasing counter for the last transaction to commit.
It uses this counter to fail transactions fast when they try to read a value that another
transaction has changed since the first transaction began.
It uses this counter to fail transactions fast when they try to read a value that another
transaction has changed since the first transaction began.
2) It copies the data not only on write opening, but also on read opening.
......
......@@ -45,10 +45,10 @@
"revisionTime": "2015-11-24T22:32:07Z"
},
{
"checksumSHA1": "+o8IunxLKImqyhMUgJ4FCkRIAhA=",
"checksumSHA1": "0JL5ZeTzdHwXRYojBJHC06AnnBs=",
"path": "github.com/zond/gotomic",
"revision": "5b217c5578228ff3979c9f9459959176fb54c388",
"revisionTime": "2013-07-06T14:15:31Z"
"revision": "25c7c0a9f89b58b13a08c2bb531363fa117159c2",
"revisionTime": "2016-06-26T07:37:22Z"
},
{
"checksumSHA1": "9jjO5GjLa0XF/nfWihF02RoH4qc=",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment