| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
The library stores error information in thread-local storage, which
means we need to make sure that the Go runtime doesn't switch OS
threads between the time we call a function and th time we attempt to
retrieve the error information.
|
|
This is only needed once per package. Having it on every file makes the
build system ask about it n times, which is silly.
|
|
Wrap the odb streams
|
|
Define the object type values as constants
|
|
The interface to these streams should be what you expect from Go, and
both have Write and Close functions so they implement
Reader/ReadCloser and Write/WriteCloser respectively.
|
|
My take on polymorphism
|
|
|
|
|
|
|
|
Provide a manual way of freeing objects, but set finalizers for them
in case the user does not want to worry about memory management, which
would be useful for commits or trees, which sare typically small.
When the objects are freed manually, the finalizer is unset to avoid
double-freeing, mimicking what the go runtime does.
|
|
|