You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Karl Fogel <kf...@red-bean.com> on 2008/10/07 22:07:38 UTC

Re: svn commit: r33413 - in trunk/subversion: include libsvn_subr tests/libsvn_subr

lgo@tigris.org writes:
> --- trunk/subversion/libsvn_subr/dirent_uri.c	(r33412)
> +++ trunk/subversion/libsvn_subr/dirent_uri.c	(r33413)
> @@ -415,6 +467,30 @@ is_ancestor(svn_boolean_t uri, const cha
>  
>  /**** Public API functions ****/
>  
> +const char *
> +svn_dirent_internal_style(const char *dirent, apr_pool_t *pool)
> +{
> +  return internal_style(DIRENT, dirent, pool);
> +}
> +
> +const char *
> +svn_dirent_local_style(const char *dirent, apr_pool_t *pool)
> +{
> +  return local_style(DIRENT, dirent, pool);
> +}
> +
> +const char *
> +svn_uri_internal_style(const char *uri, apr_pool_t *pool)
> +{
> +  return internal_style(URI, uri, pool);
> +}
> +
> +const char *
> +svn_uri_local_style(const char *uri, apr_pool_t *pool)
> +{
> +  return local_style(URI, uri, pool);
> +}
> +
>  /* We decided against using apr_filepath_root here because of the negative
>     performance impact (creating a pool and converting strings ). */
>  svn_boolean_t
> @@ -840,6 +916,12 @@ svn_dirent_get_absolute(const char **pab
>  }
>  
>  const char *
> +svn_uri_canonicalize(const char *uri, apr_pool_t *pool)
> +{
> +  return canonicalize(URI, uri, pool);;
> +}

I realize it's not part of this commit, but the aliasing of TRUE and
FALSE to potentially non-binary values strikes me as a bad idea.  If
we're going to have symbolic names DIRENT and URI, could we at least
make them enums, or named integer constants, or something?

I'm talking about this part at the beginning of the file:

   /* Labels for some commonly used constants */
   #define URI TRUE
   #define DIRENT FALSE

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r33413 - in trunk/subversion: include libsvn_subr tests/libsvn_subr

Posted by Karl Fogel <kf...@red-bean.com>.
Lieven Govaerts <sv...@mobsol.be> writes:
> Switched to an enum in r33553.

Thanks, and glad you agree.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r33413 - in trunk/subversion: include libsvn_subr tests/libsvn_subr

Posted by Lieven Govaerts <sv...@mobsol.be>.
Karl Fogel wrote:
> lgo@tigris.org writes:

>>  
>>  const char *
>> +svn_uri_canonicalize(const char *uri, apr_pool_t *pool)
>> +{
>> +  return canonicalize(URI, uri, pool);;
>> +}
> 
> I realize it's not part of this commit, but the aliasing of TRUE and
> FALSE to potentially non-binary values strikes me as a bad idea.  If
> we're going to have symbolic names DIRENT and URI, could we at least
> make them enums, or named integer constants, or something?
> 
> I'm talking about this part at the beginning of the file:
> 
>    /* Labels for some commonly used constants */
>    #define URI TRUE
>    #define DIRENT FALSE

Switched to an enum in r33553.

Lieven

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org