X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb2%2Fprivate.h;h=8d4b7b9b5d4a36add7ddf972eccff44e196e0cd2;hp=1a81286d5e36280a0fe9329474921ab6c480c9ff;hb=96b169e986cda1de9ffbbdc98042e1099515ca34;hpb=fe55330a60e4e14ea6cac2ff40d50eddca4cf140 diff --git a/ccan/tdb2/private.h b/ccan/tdb2/private.h index 1a81286d..8d4b7b9b 100644 --- a/ccan/tdb2/private.h +++ b/ccan/tdb2/private.h @@ -418,16 +418,15 @@ void *tdb_convert(const struct tdb_context *tdb, void *buf, tdb_len_t size); void tdb_munmap(struct tdb_context *tdb); void tdb_mmap(struct tdb_context *tdb); -/* Either make a copy into pad and return that, or return ptr into mmap. - * Converts endian (ie. will use pad in that case). */ -void *tdb_get(struct tdb_context *tdb, tdb_off_t off, void *pad, size_t len); - /* Either alloc a copy, or give direct access. Release frees or noop. */ const void *tdb_access_read(struct tdb_context *tdb, tdb_off_t off, tdb_len_t len, bool convert); void *tdb_access_write(struct tdb_context *tdb, tdb_off_t off, tdb_len_t len, bool convert); +/* Is this pointer direct? (Otherwise it's malloced) */ +bool is_direct(const struct tdb_context *tdb, const void *p); + /* Release result of tdb_access_read/write. */ void tdb_access_release(struct tdb_context *tdb, const void *p); /* Commit result of tdb_acces_write. */