subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1340523 - /subversion/trunk/subversion/libsvn_subr/path.c
Date Sat, 19 May 2012 17:37:50 GMT
Author: rhuijben
Date: Sat May 19 17:37:50 2012
New Revision: 1340523

URL: http://svn.apache.org/viewvc?rev=1340523&view=rev
Log:
* subversion/libsvn_subr/path.c
  (svn_path_cstring_from_utf8
   svn_path_cstring_to_utf8): Use a simple apr_pstrdup() on systems that always
     use utf-8, but would call into a shared library to find out. This allows
     the code optimizer to avoid doing unneeded work.

Modified:
    subversion/trunk/subversion/libsvn_subr/path.c

Modified: subversion/trunk/subversion/libsvn_subr/path.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/path.c?rev=1340523&r1=1340522&r2=1340523&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/path.c (original)
+++ subversion/trunk/subversion/libsvn_subr/path.c Sat May 19 17:37:50 2012
@@ -1102,15 +1102,19 @@ svn_path_cstring_from_utf8(const char **
                            const char *path_utf8,
                            apr_pool_t *pool)
 {
+#if !defined(WIN32) && !defined(DARWIN)
   svn_boolean_t path_is_utf8;
   SVN_ERR(get_path_encoding(&path_is_utf8, pool));
   if (path_is_utf8)
+#endif
     {
       *path_apr = apr_pstrdup(pool, path_utf8);
       return SVN_NO_ERROR;
     }
+#if !defined(WIN32) && !defined(DARWIN)
   else
     return svn_utf_cstring_from_utf8(path_apr, path_utf8, pool);
+#endif
 }
 
 
@@ -1119,15 +1123,19 @@ svn_path_cstring_to_utf8(const char **pa
                          const char *path_apr,
                          apr_pool_t *pool)
 {
+#if !defined(WIN32) && !defined(DARWIN)
   svn_boolean_t path_is_utf8;
   SVN_ERR(get_path_encoding(&path_is_utf8, pool));
   if (path_is_utf8)
+#endif
     {
       *path_utf8 = apr_pstrdup(pool, path_apr);
       return SVN_NO_ERROR;
     }
+#if !defined(WIN32) && !defined(DARWIN)
   else
     return svn_utf_cstring_to_utf8(path_utf8, path_apr, pool);
+#endif
 }
 
 



Mime
View raw message