[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] add extra consts to svn_path interface

From: Greg Stein <gstein_at_lyra.org>
Date: 2000-09-11 11:02:44 CEST

applied. thx!

On Sun, Sep 10, 2000 at 07:14:38PM +0100, Joe Orton wrote:
> Ah, sorry, I got carried away in the excitement, this was bogus:
>
> On Sun, Sep 10, 2000 at 05:49:20PM +0100, Joe Orton wrote:
> ...
> > /* Duplicate and return PATH's last component, w/o separator. */
> > -svn_string_t *svn_path_last_component (svn_string_t *path,
> > +svn_string_t *svn_path_last_component (const svn_string_t *path,
>
> Hopefully, this is a less bogus patch:
>
> Index: include/svn_path.h
> ===================================================================
> RCS file: /cvs/subversion/subversion/include/svn_path.h,v
> retrieving revision 1.10
> diff -u -p -r1.10 svn_path.h
> --- include/svn_path.h 2000/09/01 21:03:12 1.10
> +++ include/svn_path.h 2000/09/10 18:06:33
> @@ -86,13 +86,13 @@
>
> /* Add a COMPONENT (a null-terminated C-string) to PATH. */
> void svn_path_add_component_nts (svn_string_t *path,
> - char *component,
> + const char *component,
> int style,
> apr_pool_t *pool);
>
> /* Add COMPONENT to PATH. */
> void svn_path_add_component (svn_string_t *path,
> - svn_string_t *component,
> + const svn_string_t *component,
> int style,
> apr_pool_t *pool);
>
> @@ -109,6 +109,6 @@ svn_string_t *svn_path_last_component (s
> directory -- that is, if it is NULL or if prepending it as a
> component to an existing path would result in no meaningful
> change. */
> -int svn_path_isempty (svn_string_t *path, int style);
> +int svn_path_isempty (const svn_string_t *path, int style);
>
> #endif /* SVN_PATHS_H */
> Index: libsvn_subr/path.c
> ===================================================================
> RCS file: /cvs/subversion/subversion/libsvn_subr/path.c,v
> retrieving revision 1.11
> diff -u -p -r1.11 path.c
> --- libsvn_subr/path.c 2000/09/09 16:11:28 1.11
> +++ libsvn_subr/path.c 2000/09/10 18:06:33
> @@ -98,7 +98,7 @@ add_component_internal (svn_string_t *pa
> /* See ../include/svn_path.h for details. */
> void
> svn_path_add_component_nts (svn_string_t *path,
> - char *component,
> + const char *component,
> int style,
> apr_pool_t *pool)
> {
> @@ -109,7 +109,7 @@ svn_path_add_component_nts (svn_string_t
> /* See ../include/svn_path.h for details. */
> void
> svn_path_add_component (svn_string_t *path,
> - svn_string_t *component,
> + const svn_string_t *component,
> int style,
> apr_pool_t *pool)
> {
> @@ -160,7 +160,7 @@ svn_path_last_component (svn_string_t *p
>
> /* See ../include/svn_path.h for details. */
> int
> -svn_path_isempty (svn_string_t *path, int style)
> +svn_path_isempty (const svn_string_t *path, int style)
> {
> /* kff todo: `style' ignored presently. */
>

-- 
Greg Stein, http://www.lyra.org/
Received on Sat Oct 21 14:36:08 2006

This is an archived mail posted to the Subversion Dev mailing list.