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 2013/07/28 23:48:42 UTC

svn commit: r1507857 - in /subversion/branches/fsx: ./ subversion/include/private/svn_string_private.h subversion/libsvn_subr/prefix_string.c

Author: stefan2
Date: Sun Jul 28 21:48:41 2013
New Revision: 1507857

URL: http://svn.apache.org/r1507857
Log:
On the fsx branch:  Merge the patches pertaining to the new
svn__prefix_string_* private API (rr1498029) from /branches/fsfs-format7.
There were no conflicts.

Added:
    subversion/branches/fsx/subversion/libsvn_subr/prefix_string.c
      - copied unchanged from r1498029, subversion/branches/fsfs-format7/subversion/libsvn_subr/prefix_string.c
Modified:
    subversion/branches/fsx/   (props changed)
    subversion/branches/fsx/subversion/include/private/svn_string_private.h

Propchange: subversion/branches/fsx/
------------------------------------------------------------------------------
  Merged /subversion/branches/fsfs-format7:r1498029

Modified: subversion/branches/fsx/subversion/include/private/svn_string_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/include/private/svn_string_private.h?rev=1507857&r1=1507856&r2=1507857&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/include/private/svn_string_private.h (original)
+++ subversion/branches/fsx/subversion/include/private/svn_string_private.h Sun Jul 28 21:48:41 2013
@@ -264,6 +264,58 @@ svn_cstring__reverse_match_length(const 
 
 /** @} */
 
+/** Prefix trees.
+ *
+ * Prefix trees allow for a space-efficient representation of a set of path-
+ * like strings, i.e. those that share common prefixes.  Any given string
+ * value will be stored only once, i.e. two strings stored in the same tree
+ * are equal if and only if the point to the same #svn__prefix_string_t.
+ *
+ * @defgroup svn_prefix_string Strings in prefix trees.
+* @{
+ */
+
+/**
+ * Opaque data type for prefix-tree-based strings.
+ */
+typedef struct svn__prefix_string_t svn__prefix_string_t;
+
+/**
+ * Opaque data type representing a prefix tree
+ */
+typedef struct svn__prefix_tree_t svn__prefix_tree_t;
+
+/**
+ * Return a new prefix tree allocated in @a pool.
+ */
+svn__prefix_tree_t *
+svn__prefix_tree_create(apr_pool_t *pool);
+
+/**
+ * Return a string with the value @a s stored in @a tree.  If no such string
+ * exists yet, add it automatically.
+ */
+svn__prefix_string_t *
+svn__prefix_string_create(svn__prefix_tree_t *tree,
+                          const char *s);
+
+/**
+ * Return the contents of @a s as a new string object allocated in @a pool.
+ */
+svn_string_t *
+svn__prefix_string_expand(const svn__prefix_string_t *s,
+                          apr_pool_t *pool);
+
+/**
+ * Compare the two strings @a lhs and @a rhs that must be part of the same
+ * tree.
+ */
+int
+svn__prefix_string_compare(const svn__prefix_string_t *lhs,
+                           const svn__prefix_string_t *rhs);
+
+/** @} */
+
 /** @} */