Give gitObject.Free a pointer-receiver

This is needed to get runtime.SetFinalizer to work, which
expects a pointer-receiver. Without it the runtime will crash, when it
tries to garbage-collect an object.
This commit is contained in:
Axel Wagner 2013-04-26 02:32:41 +02:00
parent 2bf17ba2f1
commit 289d84e1f7
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ func (o gitObject) Type() ObjectType {
return ObjectType(C.git_object_type(o.ptr))
}
func (o gitObject) Free() {
func (o *gitObject) Free() {
runtime.SetFinalizer(o, nil)
C.git_commit_free(o.ptr)
}