summaryrefslogtreecommitdiff
path: root/refdb.go
diff options
context:
space:
mode:
authorlhchavez <[email protected]>2021-09-05 13:59:36 -0700
committerGitHub <[email protected]>2021-09-05 13:59:36 -0700
commitdbe032c347b1a1308a4b880e7c5a06d8dfb4d507 (patch)
treebc64fbe9c30ed7dedbff0845c3354be77de1ae30 /refdb.go
parent549706bb573653469fbcc35c839759987c318d0c (diff)
Make all non-user-creatable structures non-comparable (#802)
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.
Diffstat (limited to 'refdb.go')
-rw-r--r--refdb.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/refdb.go b/refdb.go
index 578f43c..a8b1715 100644
--- a/refdb.go
+++ b/refdb.go
@@ -13,11 +13,13 @@ import (
)
type Refdb struct {
+ doNotCompare
ptr *C.git_refdb
r *Repository
}
type RefdbBackend struct {
+ doNotCompare
ptr *C.git_refdb_backend
}
@@ -38,7 +40,7 @@ func (v *Repository) NewRefdb() (refdb *Refdb, err error) {
}
func NewRefdbBackendFromC(ptr unsafe.Pointer) (backend *RefdbBackend) {
- backend = &RefdbBackend{(*C.git_refdb_backend)(ptr)}
+ backend = &RefdbBackend{ptr: (*C.git_refdb_backend)(ptr)}
return backend
}