<feed xmlns='http://www.w3.org/2005/Atom'>
<title>jcarr/libgit2/handles.go, branch v0.1.5</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>http://cgit.wit.com/jcarr/libgit2/atom?h=v0.1.5</id>
<link rel='self' href='http://cgit.wit.com/jcarr/libgit2/atom?h=v0.1.5'/>
<link rel='alternate' type='text/html' href='http://cgit.wit.com/jcarr/libgit2/'/>
<updated>2021-09-05T20:59:36Z</updated>
<entry>
<title>Make all non-user-creatable structures non-comparable (#802)</title>
<updated>2021-09-05T20:59:36Z</updated>
<author>
<name>lhchavez</name>
<email>lhchavez@lhchavez.com</email>
</author>
<published>2021-09-05T20:59:36Z</published>
<link rel='alternate' type='text/html' href='http://cgit.wit.com/jcarr/libgit2/commit/?id=dbe032c347b1a1308a4b880e7c5a06d8dfb4d507'/>
<id>urn:sha1:dbe032c347b1a1308a4b880e7c5a06d8dfb4d507</id>
<content type='text'>
This change makes all non-user-creatable structures non-comparable. This
makes it easier to add changes later that don't introduce breaking
changes from the go compatibility guarantees perspective.

This, of course, implies that this change _is_ a breaking change, but since
these structures are not intended to be created by users (or de-referenced),
it should be okay.</content>
</entry>
<entry>
<title>Add a way to cleanly shut down the library (#578)</title>
<updated>2020-06-21T13:44:06Z</updated>
<author>
<name>lhchavez</name>
<email>lhchavez@lhchavez.com</email>
</author>
<published>2020-06-21T13:44:06Z</published>
<link rel='alternate' type='text/html' href='http://cgit.wit.com/jcarr/libgit2/commit/?id=619a9c236bf79c63d955490c0803833004a47154'/>
<id>urn:sha1:619a9c236bf79c63d955490c0803833004a47154</id>
<content type='text'>
This change adds the Shutdown() method, so that the library can be
cleanly shut down. This helps significanly reduce the amount of noise in
the leak detector.</content>
</entry>
<entry>
<title>handles: use real pointers to keep track of handles</title>
<updated>2016-02-18T16:33:44Z</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2016-02-18T16:07:33Z</published>
<link rel='alternate' type='text/html' href='http://cgit.wit.com/jcarr/libgit2/commit/?id=f1240e6565dfb70cfd22f4025c1453ca92ce0743'/>
<id>urn:sha1:f1240e6565dfb70cfd22f4025c1453ca92ce0743</id>
<content type='text'>
With the change to 1.6 rules, we couldn't use the Go pointers, so we
went with casting the list indices into pointers.

The runtime does not like this, however. It will sometimes detect that
we have a pointer with a very small value and consider it an invalid
pointer, bringing down the application with it.

Work around that by asking libc for the smallest amount of memory it'll
give us so we have an actual allocated pointer to use. We then use this
pointer value as the key in our map to find the Go object we're
tracking.
</content>
</entry>
<entry>
<title>handles, merge: simplify code, don't copy file contents</title>
<updated>2016-02-17T05:34:43Z</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2016-02-17T05:34:43Z</published>
<link rel='alternate' type='text/html' href='http://cgit.wit.com/jcarr/libgit2/commit/?id=a1f25eafec55509d49dffb4c84f7c5b729e6a85e'/>
<id>urn:sha1:a1f25eafec55509d49dffb4c84f7c5b729e6a85e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>handles, merge, odb: changes for Go 1.6 pointer passing rules</title>
<updated>2016-01-08T02:37:46Z</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2016-01-08T02:37:46Z</published>
<link rel='alternate' type='text/html' href='http://cgit.wit.com/jcarr/libgit2/commit/?id=42b11d403d91e25754fe60c63c26371fbb7a89a9'/>
<id>urn:sha1:42b11d403d91e25754fe60c63c26371fbb7a89a9</id>
<content type='text'>
See http://tip.golang.org/cmd/cgo/#hdr-Passing_pointers .
</content>
</entry>
<entry>
<title>Prevent slot int variable from being GCed.</title>
<updated>2015-07-26T22:02:40Z</updated>
<author>
<name>Dmitri Shuralyov</name>
<email>shurcooL@gmail.com</email>
</author>
<published>2015-07-07T02:27:58Z</published>
<link rel='alternate' type='text/html' href='http://cgit.wit.com/jcarr/libgit2/commit/?id=e1e1b4b1e164b4aba04e43f8b93c9a552fdc6ab4'/>
<id>urn:sha1:e1e1b4b1e164b4aba04e43f8b93c9a552fdc6ab4</id>
<content type='text'>
Before this change, there were no users of slot int variable in the Go
world (just a pointer to it that ended up in C world only), so Go's
garbage collector would free it and its value could not retrieved later
(once a pointer to it comes back to Go world from C world).

Keep a pointer to it in the Go world so that does not happen.

Fixes #218.
</content>
</entry>
<entry>
<title>handles: do not store handles by uintptr</title>
<updated>2015-05-22T07:50:16Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2015-05-22T07:50:16Z</published>
<link rel='alternate' type='text/html' href='http://cgit.wit.com/jcarr/libgit2/commit/?id=1bd338af5e7a329c8ec5bd85500350795d0793d2'/>
<id>urn:sha1:1bd338af5e7a329c8ec5bd85500350795d0793d2</id>
<content type='text'>
If we store values by uintptrs the GC may try to inspect their
values when it kicks in. As the pointers are most likely invalid,
this will result in an invalid pointer dereference, causing the
program to panic. We can fix this by storing values by an int
index value instead, returning pointers to those indices as
handles instead.
</content>
</entry>
<entry>
<title>handles: print pointer handle on panic.</title>
<updated>2015-05-22T07:02:24Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2015-04-24T08:08:32Z</published>
<link rel='alternate' type='text/html' href='http://cgit.wit.com/jcarr/libgit2/commit/?id=7ee534d0c50f6b7b54a6e8c83e0953a95a4cac22'/>
<id>urn:sha1:7ee534d0c50f6b7b54a6e8c83e0953a95a4cac22</id>
<content type='text'>
</content>
</entry>
<entry>
<title>handles: start slot indices with 1</title>
<updated>2015-05-22T07:02:24Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2015-04-24T07:35:58Z</published>
<link rel='alternate' type='text/html' href='http://cgit.wit.com/jcarr/libgit2/commit/?id=0a336e4abdd7c949c9dd38037165e6a16c7d7ebf'/>
<id>urn:sha1:0a336e4abdd7c949c9dd38037165e6a16c7d7ebf</id>
<content type='text'>
Using 0 as the first slot indice leads to not being able to
differentiate between a handle to the first element or a
NULL-handle. As current code may check whether the pointer is
NULL, change the first indice to be 1 instead.
</content>
</entry>
<entry>
<title>handles: correctly initialize all members</title>
<updated>2015-05-22T07:02:24Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2015-04-23T08:02:57Z</published>
<link rel='alternate' type='text/html' href='http://cgit.wit.com/jcarr/libgit2/commit/?id=bde012f3d478752787bab0978e0bfaf5deefa42b'/>
<id>urn:sha1:bde012f3d478752787bab0978e0bfaf5deefa42b</id>
<content type='text'>
</content>
</entry>
</feed>
