You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2015/01/13 02:26:57 UTC

svn commit: r1651260 - /subversion/trunk/subversion/libsvn_fs_x/low_level.c

Author: stefan2
Date: Tue Jan 13 01:26:57 2015
New Revision: 1651260

URL: http://svn.apache.org/r1651260
Log:
* subversion/libsvn_fs_x/low_level.c
  (auto_escape_path,
   auto_unescape_path): The POOL parameter is a pure RESULT_POOL.
                        Add missing docstrings.

Modified:
    subversion/trunk/subversion/libsvn_fs_x/low_level.c

Modified: subversion/trunk/subversion/libsvn_fs_x/low_level.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/low_level.c?rev=1651260&r1=1651259&r2=1651260&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/low_level.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/low_level.c Tue Jan 13 01:26:57 2015
@@ -354,9 +354,11 @@ read_rep_offsets(svn_fs_x__representatio
   return SVN_NO_ERROR;
 }
 
+/* If PATH needs to be escaped, return an escaped version of it, allocated
+ * from RESULT_POOL. Otherwise, return PATH directly. */
 static const char *
 auto_escape_path(const char *path,
-                 apr_pool_t *pool)
+                 apr_pool_t *result_pool)
 {
   apr_size_t len = strlen(path);
   apr_size_t i;
@@ -365,7 +367,8 @@ auto_escape_path(const char *path,
   for (i = 0; i < len; ++i)
     if (path[i] < ' ')
       {
-        svn_stringbuf_t *escaped = svn_stringbuf_create_ensure(2 * len, pool);
+        svn_stringbuf_t *escaped = svn_stringbuf_create_ensure(2 * len,
+                                                               result_pool);
         for (i = 0; i < len; ++i)
           if (path[i] < ' ')
             {
@@ -379,13 +382,15 @@ auto_escape_path(const char *path,
 
         return escaped->data;
       }
-      
+
    return path;
 }
 
+/* If PATH has been escaped, return the un-escaped version of it, allocated
+ * from RESULT_POOL. Otherwise, return PATH directly. */
 static const char *
 auto_unescape_path(const char *path,
-                   apr_pool_t *pool)
+                   apr_pool_t *result_pool)
 {
   const char esc = '\x1b';
   if (strchr(path, esc))
@@ -393,7 +398,8 @@ auto_unescape_path(const char *path,
       apr_size_t len = strlen(path);
       apr_size_t i;
 
-      svn_stringbuf_t *unescaped = svn_stringbuf_create_ensure(len, pool);
+      svn_stringbuf_t *unescaped = svn_stringbuf_create_ensure(len,
+                                                               result_pool);
       for (i = 0; i < len; ++i)
         if (path[i] == esc)
           svn_stringbuf_appendbyte(unescaped, path[++i] + 1 - 'A');