You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@lyra.org> on 2001/02/08 19:08:22 UTC
Re: CVS update: subversion/subversion/libsvn_fs dag.h
On Thu, Feb 08, 2001 at 05:26:43PM -0000, jimb@tigris.org wrote:
>...
> +/* Return a new dag_node_t object referring to the same node as NODE,
> + allocated in TRAIL->pool. */
> +dag_node_t *svn_fs__dag_dup (dag_node_t *node,
> + trail_t *trail);
>...
> +/* Return the filesystem containing NODE. */
> +const svn_fs_t *svn_fs__dag_get_fs (dag_node_t *node);
The parameters in the above two functions can/should be "const". But that
svn_fs_t return value probably shouldn't. You wouldn't be able to pass the
FS anywhere if you do that.
>...
> +/* Return the node revision ID of NODE. The value returned is shared
> + with NODE, and will be deallocated when NODE is. */
> +const svn_fs_id_t *svn_fs__dag_get_id (dag_node_t *node);
>...
> +/* Return true iff NODE is mutable. */
> +int svn_fs__dag_is_mutable (dag_node_t *node);
>...
> +/* Return true iff NODE is a file/directory. */
> +int svn_fs__dag_is_file (dag_node_t *node);
> +int svn_fs__dag_is_directory (dag_node_t *node);
These could be const parameters, too.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
Re: CVS update: subversion/subversion/libsvn_fs dag.h
Posted by Jim Blandy <ji...@zwingli.cygnus.com>.
Greg Stein <gs...@lyra.org> writes:
>
> On Thu, Feb 08, 2001 at 05:26:43PM -0000, jimb@tigris.org wrote:
> >...
> > +/* Return a new dag_node_t object referring to the same node as NODE,
> > + allocated in TRAIL->pool. */
> > +dag_node_t *svn_fs__dag_dup (dag_node_t *node,
> > + trail_t *trail);
> >...
> > +/* Return the filesystem containing NODE. */
> > +const svn_fs_t *svn_fs__dag_get_fs (dag_node_t *node);
>
> The parameters in the above two functions can/should be "const". But that
> svn_fs_t return value probably shouldn't. You wouldn't be able to pass the
> FS anywhere if you do that.
That `const svn_fs_t' was a cut-and-paste-o. Thanks.
I don't want the node arguments to be const, though. There's no
reason those functions shouldn't be permitted to change the contents
of the node for some internal reason if they please.