hwright_at_tigris.org writes:
> Log:
> Introduce a generic metadata API inside the Berkeley DB filesystem. We'll use
> it in a bit.
>
> * subversion/libsvn_fs_base/tree.c
> (metadata_set_args, txn_body_metadata_set, svn_fs_base__metadata_set,
> metadata_get_args, txn_body_metadata_get, svn_fs_base__metadata_get): New.
>
> * subversion/libsvn_fs_base/tree.h
> (svn_fs_base__metadata_set, svn_fs_base__metadata_get): New.
>
> --- trunk/subversion/libsvn_fs_base/tree.h (r33297)
> +++ trunk/subversion/libsvn_fs_base/tree.h (r33298)
> @@ -44,6 +44,32 @@ svn_error_t *svn_fs_base__txn_root(svn_f
>
>
>
> +/* Inserting and retrieving metadata about the fs */
> +
> +/* Set the metadata value for KEY to VAL in FS. To remove a value from the
> + metadata, pass NULL for VAL.
> +
> + KEY and VAL should be NULL-terminated strings. */
> +svn_error_t *
> +svn_fs_base__metadata_set(svn_fs_t *fs,
> + const char *key,
> + const char *val,
> + apr_pool_t *pool);
Is POOL used only for tmp allocation, or are KEY and VAL copied into
POOL, or into FS's POOL, or just set by reference...? (I.e., document
the lifetime behaviors here.)
> +/* Retrieve the metadata value for KEY into *VAL for FS, allocated in POOL.
> + If the fs doesn't support metadata storage, or the value does not exist,
> + *VAL is set to NULL.
> +
> + KEY should be a NULL-terminated string. */
> +svn_error_t *
> +svn_fs_base__metadata_get(const char **val,
> + svn_fs_t *fs,
> + const char *key,
> + apr_pool_t *pool);
Looks good.
-Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-10-01 20:49:31 CEST