Re: [PATCH 01/17] odb: split `struct odb_source` into separate header
- From
Justin Tobler <jltobler@gmail.com>
- Date
- Mar 4, 2026, 15:55 UTC
- Message-ID
- <aahToju3J2qj6lR3@denethor>
- In-Reply-To
- <20260223-b4-pks-odb-source-pluggable-v1-1-253bac1db598@pks.im>
On 26/02/23 05:17PM, Patrick Steinhardt wrote:
Show 8 quoted lines
> Subsequent commits will expand the `struct odb_source` to become a > generic interface for accessing an object database source. As part of > these refactorings we'll add a set of function pointers that will > significantly expand the structure overall. > > Prepare for this by splitting out the `struct odb_source` into a > separate header. This keeps the high-level object database interface > detached from the low-level object database sources.
This certainly seems sensible to me. I've been thinking about also splitting out ODB transactions into a separate header. I may do something similar in the future.
> Signed-off-by: Patrick Steinhardt <ps@pks.im> > ---
[snip]
Show 9 quoted lines
> diff --git a/odb.h b/odb.h > index 68b8ec2289..e13b5b7c44 100644 > --- a/odb.h > +++ b/odb.h > @@ -3,6 +3,7 @@ > > #include "hashmap.h" > #include "object.h" > +#include "odb/source.h"
Out of curiousity, since we include the header here, it is transitively included wherever we are using `struct odb_source`. Ideally should we be explicit or would it be best to just rely on this transitively?
The rest of this patch looks good.
-Justin