You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Jim Blandy <ji...@zwingli.cygnus.com> on 2001/03/05 22:19:43 UTC

Re: CVS update: subversion/subversion/libsvn_fs txn.c

Are you sure?  The name returned is guaranteed to be a copy, allocated
in POOL.  All this does is constrain what the *caller* can do with the
value --- the value that was just copied into their very own pool.  If
they want to change it, they'll need to make a copy, even though
svn_fs_txn_name already made one.

gstein@tigris.org writes:

> 
>   User: gstein  
>   Date: 01/03/03 09:25:38
> 
>   Modified:    subversion/include svn_fs.h
>                subversion/libsvn_fs txn.c
>   Log:
>   * svn_fs.h (svn_fs_txn_name): name_p parameter should be "const"
>   * txn.c (svn_fs_txn_name): name_p parameter is now "const"
>   
>   Revision  Changes    Path
>   1.54      +1 -1      subversion/subversion/include/svn_fs.h
>   
>   Index: svn_fs.h
>   ===================================================================
>   RCS file: /cvs/subversion/subversion/include/svn_fs.h,v
>   retrieving revision 1.53
>   retrieving revision 1.54
>   diff -u -r1.53 -r1.54
>   --- svn_fs.h	2001/03/02 23:07:35	1.53
>   +++ svn_fs.h	2001/03/03 17:25:38	1.54
>   @@ -420,7 +420,7 @@
>    
>    /* Set *NAME_P to the name of the transaction TXN, as a
>       null-terminated string.  Allocate the name in POOL.  */
>   -svn_error_t *svn_fs_txn_name (char **name_p,
>   +svn_error_t *svn_fs_txn_name (const char **name_p,
>                                  svn_fs_txn_t *txn,
>                                  apr_pool_t *pool);
>    
>   
>   
>   
>   1.29      +1 -1      subversion/subversion/libsvn_fs/txn.c
>   
>   Index: txn.c
>   ===================================================================
>   RCS file: /cvs/subversion/subversion/libsvn_fs/txn.c,v
>   retrieving revision 1.28
>   retrieving revision 1.29
>   diff -u -r1.28 -r1.29
>   --- txn.c	2001/02/24 09:13:31	1.28
>   +++ txn.c	2001/03/03 17:25:38	1.29
>   @@ -117,7 +117,7 @@
>    
>    
>    svn_error_t *
>   -svn_fs_txn_name (char **name_p,
>   +svn_fs_txn_name (const char **name_p,
>                     svn_fs_txn_t *txn,
>                     apr_pool_t *pool)
>    {
>   
>   
>   
>