subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1130548 - in /subversion/trunk/subversion: include/ include/private/ libsvn_client/ libsvn_ra_svn/ libsvn_repos/ libsvn_subr/ libsvn_wc/ svn/
Date Thu, 02 Jun 2011 13:46:28 GMT
Author: stefan2
Date: Thu Jun  2 13:46:27 2011
New Revision: 1130548

URL: http://svn.apache.org/viewvc?rev=1130548&view=rev
Log:
After some discussion on IRC, rename svn_string_from_stringbuf to
svn_stringbuf__morph_into_string and move it to a private header.

* include/private/svn_string_private.h
  new header
  (svn_stringbuf__morph_into_string): renamed from svn_string_from_stringbuf
* include/svn_string.h
  (svn_string_from_stringbuf): remove from public header
* subversion/libsvn_subr/svn_string.c
  (svn_stringbuf__morph_into_string): rename implementation

* subversion/libsvn_client/patch.c
  (install_patched_prop_targets): use the renamed function
* subversion/libsvn_ra_svn/marshal.c
  (read_string): dito
* subversion/libsvn_repos/hooks.c
  (run_hook_cmd, lock_token_content): dito
* subversion/libsvn_subr/mergeinfo.c
  (svn_rangelist_to_string, svn_mergeinfo_to_string,
   svn_mergeinfo__catalog_to_formatted_string,
   svn_mergeinfo__to_formatted_string): dito
* subversion/libsvn_subr/subst.c
  (keyword_printf): dito
* subversion/libsvn_subr/utf.c
  (svn_utf_string_to_utf8, svn_utf_string_from_utf8): and here
* subversion/libsvn_wc/props.c
  (maybe_generate_propconflict, svn_wc_canonicalize_svn_prop): here
* subversion/svn/util.c:
  (svn_cl__edit_string_externally): and finally here

Added:
    subversion/trunk/subversion/include/private/svn_string_private.h   (contents, props changed)
      - copied, changed from r1130527, subversion/trunk/subversion/include/svn_string.h
Modified:
    subversion/trunk/subversion/include/svn_string.h
    subversion/trunk/subversion/libsvn_client/patch.c
    subversion/trunk/subversion/libsvn_ra_svn/marshal.c
    subversion/trunk/subversion/libsvn_repos/hooks.c
    subversion/trunk/subversion/libsvn_subr/mergeinfo.c
    subversion/trunk/subversion/libsvn_subr/subst.c
    subversion/trunk/subversion/libsvn_subr/svn_string.c
    subversion/trunk/subversion/libsvn_subr/utf.c
    subversion/trunk/subversion/libsvn_wc/props.c
    subversion/trunk/subversion/svn/util.c

Copied: subversion/trunk/subversion/include/private/svn_string_private.h (from r1130527, subversion/trunk/subversion/include/svn_string.h)
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_string_private.h?p2=subversion/trunk/subversion/include/private/svn_string_private.h&p1=subversion/trunk/subversion/include/svn_string.h&r1=1130527&r2=1130548&rev=1130548&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_string.h (original)
+++ subversion/trunk/subversion/include/private/svn_string_private.h Thu Jun  2 13:46:27 2011
@@ -20,66 +20,15 @@
  * ====================================================================
  * @endcopyright
  *
- * @file svn_string.h
- * @brief Counted-length strings for Subversion, plus some C string goodies.
- *
- * There are two string datatypes: @c svn_string_t and @c svn_stringbuf_t.
- * The former is a simple pointer/length pair useful for passing around
- * strings (or arbitrary bytes) with a counted length. @c svn_stringbuf_t is
- * buffered to enable efficient appending of strings without an allocation
- * and copy for each append operation.
- *
- * @c svn_string_t contains a <tt>const char *</tt> for its data, so it is
- * most appropriate for constant data and for functions which expect constant,
- * counted data. Functions should generally use <tt>const @c svn_string_t
- * *</tt> as their parameter to indicate they are expecting a constant,
- * counted string.
- *
- * @c svn_stringbuf_t uses a plain <tt>char *</tt> for its data, so it is
- * most appropriate for modifiable data.
- *
- * <h3>Invariants</h3>
- *
- *   1. Null termination:
- *
- *      Both structures maintain a significant invariant:
- *
- *         <tt>s->data[s->len] == '\\0'</tt>
- *
- *      The functions defined within this header file will maintain
- *      the invariant (which does imply that memory is
- *      allocated/defined as @c len+1 bytes).  If code outside of the
- *      @c svn_string.h functions manually builds these structures,
- *      then they must enforce this invariant.
- *
- *      Note that an @c svn_string(buf)_t may contain binary data,
- *      which means that strlen(s->data) does not have to equal @c
- *      s->len. The NULL terminator is provided to make it easier to
- *      pass @c s->data to C string interfaces.
- *
- *
- *   2. Non-NULL input:
- *
- *      All the functions assume their input data is non-NULL,
- *      unless otherwise documented, and may seg fault if passed
- *      NULL.  The input data may *contain* null bytes, of course, just
- *      the data pointer itself must not be NULL.
- *
- * <h3>Memory allocation</h3>
- *
- *   All the functions make a deep copy of all input data, and never store
- *   a pointer to the original input data.
+ * @file svn_string_private.h
+ * @brief Non-public string utility functions.
  */
 
 
-#ifndef SVN_STRING_H
-#define SVN_STRING_H
-
-#include <apr.h>          /* for apr_size_t */
-#include <apr_pools.h>    /* for apr_pool_t */
-#include <apr_tables.h>   /* for apr_array_header_t */
+#ifndef SVN_STRING_PRIVATE_H
+#define SVN_STRING_PRIVATE_H
 
-#include "svn_types.h"    /* for svn_boolean_t, svn_error_t */
+#include "svn_string.h"    /* for svn_boolean_t, svn_error_t */
 
 #ifdef __cplusplus
 extern "C" {
@@ -91,396 +40,19 @@ extern "C" {
  */
 
 
-
-/** A simple counted string. */
-typedef struct svn_string_t
-{
-  const char *data; /**< pointer to the bytestring */
-  apr_size_t len;   /**< length of bytestring */
-} svn_string_t;
-
-/** A buffered string, capable of appending without an allocation and copy
- * for each append. */
-typedef struct svn_stringbuf_t
-{
-  /** a pool from which this string was originally allocated, and is not
-   * necessarily specific to this string.  This is used only for allocating
-   * more memory from when the string needs to grow.
-   */
-  apr_pool_t *pool;
-
-  /** pointer to the bytestring */
-  char *data;
-
-  /** length of bytestring */
-  apr_size_t len;
-
-  /** total size of buffer allocated */
-  apr_size_t blocksize;
-} svn_stringbuf_t;
-
-
-/** svn_string_t functions.
+/** Private functions.
  *
- * @defgroup svn_string_svn_string_t svn_string_t functions
+ * @defgroup svn_string_private Private functions
  * @{
  */
 
-/** Create a new bytestring containing a C string (NULL-terminated). */
-svn_string_t *
-svn_string_create(const char *cstring, apr_pool_t *pool);
-
-/** Create a new bytestring containing a generic string of bytes
- * (NOT NULL-terminated) */
-svn_string_t *
-svn_string_ncreate(const char *bytes, apr_size_t size, apr_pool_t *pool);
-
-/** Create a new string with the contents of the given stringbuf */
-svn_string_t *
-svn_string_create_from_buf(const svn_stringbuf_t *strbuf, apr_pool_t *pool);
-
-/** Create a new bytestring by formatting @a cstring (NULL-terminated)
- * from varargs, which are as appropriate for apr_psprintf().
- */
-svn_string_t *
-svn_string_createf(apr_pool_t *pool, const char *fmt, ...)
-  __attribute__((format(printf, 2, 3)));
-
-/** Create a new bytestring by formatting @a cstring (NULL-terminated)
- * from a @c va_list (see svn_stringbuf_createf()).
- */
-svn_string_t *
-svn_string_createv(apr_pool_t *pool, const char *fmt, va_list ap)
-  __attribute__((format(printf, 2, 0)));
-
-/** Return TRUE if a bytestring is empty (has length zero). */
-svn_boolean_t
-svn_string_isempty(const svn_string_t *str);
-
-/** Return a duplicate of @a original_string. */
-svn_string_t *
-svn_string_dup(const svn_string_t *original_string, apr_pool_t *pool);
-
-/** Return @c TRUE iff @a str1 and @a str2 have identical length and data. */
-svn_boolean_t
-svn_string_compare(const svn_string_t *str1, const svn_string_t *str2);
-
-/** Return offset of first non-whitespace character in @a str, or return
- * @a str->len if none.
- */
-apr_size_t
-svn_string_first_non_whitespace(const svn_string_t *str);
-
-/** Return position of last occurrence of @a ch in @a str, or return
- * @a str->len if no occurrence.
- */
-apr_size_t
-svn_string_find_char_backward(const svn_string_t *str, char ch);
-
 /** Returns the @a svn_string_t information contained in the data and
  * len members of @a strbuf. This is effectively a typecast, converting
  * @a strbuf into an svn_string_t. This first will become invalid and must
  * not be accessed after this function returned.
  */
 svn_string_t *
-svn_string_from_stringbuf(svn_stringbuf_t *strbuf);
-/** @} */
-
-
-/** svn_stringbuf_t functions.
- *
- * @defgroup svn_string_svn_stringbuf_t svn_stringbuf_t functions
- * @{
- */
-
-/** Create a new bytestring containing a C string (NULL-terminated). */
-svn_stringbuf_t *
-svn_stringbuf_create(const char *cstring, apr_pool_t *pool);
-
-/** Create a new bytestring containing a generic string of bytes
- * (NON-NULL-terminated)
- */
-svn_stringbuf_t *
-svn_stringbuf_ncreate(const char *bytes, apr_size_t size, apr_pool_t *pool);
-
-/** Create a new empty bytestring with at least @a minimum_size bytes of
- * space available in the memory block.
- *
- * The allocated string buffer will be one byte larger than @a minimum_size
- * to account for a final '\\0'.
- *
- * @since New in 1.6.
- */
-svn_stringbuf_t *
-svn_stringbuf_create_ensure(apr_size_t minimum_size, apr_pool_t *pool);
-
-/** Create a new stringbuf with the contents of the given string */
-svn_stringbuf_t *
-svn_stringbuf_create_from_string(const svn_string_t *str, apr_pool_t *pool);
-
-/** Create a new bytestring by formatting @a cstring (NULL-terminated)
- * from varargs, which are as appropriate for apr_psprintf().
- */
-svn_stringbuf_t *
-svn_stringbuf_createf(apr_pool_t *pool, const char *fmt, ...)
-  __attribute__((format(printf, 2, 3)));
-
-/** Create a new bytestring by formatting @a cstring (NULL-terminated)
- * from a @c va_list (see svn_stringbuf_createf()).
- */
-svn_stringbuf_t *
-svn_stringbuf_createv(apr_pool_t *pool, const char *fmt, va_list ap)
-  __attribute__((format(printf, 2, 0)));
-
-/** Make sure that the string @a str has at least @a minimum_size bytes of
- * space available in the memory block.
- *
- * (@a minimum_size should include space for the terminating NULL character.)
- */
-void
-svn_stringbuf_ensure(svn_stringbuf_t *str, apr_size_t minimum_size);
-
-/** Set a bytestring @a str to @a value */
-void
-svn_stringbuf_set(svn_stringbuf_t *str, const char *value);
-
-/** Set a bytestring @a str to empty (0 length). */
-void
-svn_stringbuf_setempty(svn_stringbuf_t *str);
-
-/** Return @c TRUE if a bytestring is empty (has length zero). */
-svn_boolean_t
-svn_stringbuf_isempty(const svn_stringbuf_t *str);
-
-/** Chop @a nbytes bytes off end of @a str, but not more than @a str->len. */
-void
-svn_stringbuf_chop(svn_stringbuf_t *str, apr_size_t nbytes);
-
-/** Fill bytestring @a str with character @a c. */
-void
-svn_stringbuf_fillchar(svn_stringbuf_t *str, unsigned char c);
-
-/** Append a single character @a byte onto @a targetstr.
- * This is an optimized version of @ref svn_stringbuf_appendbytes
- * that is much faster to call and execute. Gains vary with the ABI.
- * The advantages extend beyond the actual call because the reduced
- * register pressure allows for more optimization within the caller.
- *
- * reallocs if necessary. @a targetstr is affected, nothing else is.
- * @since New in 1.7.
- */
-void
-svn_stringbuf_appendbyte(svn_stringbuf_t *targetstr,
-                         char byte);
-
-/** Append an array of bytes onto @a targetstr.
- *
- * reallocs if necessary. @a targetstr is affected, nothing else is.
- */
-void
-svn_stringbuf_appendbytes(svn_stringbuf_t *targetstr,
-                          const char *bytes,
-                          apr_size_t count);
-
-/** Append an @c svn_stringbuf_t onto @a targetstr.
- *
- * reallocs if necessary. @a targetstr is affected, nothing else is.
- */
-void
-svn_stringbuf_appendstr(svn_stringbuf_t *targetstr,
-                        const svn_stringbuf_t *appendstr);
-
-/** Append a C string onto @a targetstr.
- *
- * reallocs if necessary. @a targetstr is affected, nothing else is.
- */
-void
-svn_stringbuf_appendcstr(svn_stringbuf_t *targetstr,
-                         const char *cstr);
-
-/** Return a duplicate of @a original_string. */
-svn_stringbuf_t *
-svn_stringbuf_dup(const svn_stringbuf_t *original_string, apr_pool_t *pool);
-
-/** Return @c TRUE iff @a str1 and @a str2 have identical length and data. */
-svn_boolean_t
-svn_stringbuf_compare(const svn_stringbuf_t *str1,
-                      const svn_stringbuf_t *str2);
-
-/** Return offset of first non-whitespace character in @a str, or return
- * @a str->len if none.
- */
-apr_size_t
-svn_stringbuf_first_non_whitespace(const svn_stringbuf_t *str);
-
-/** Strip whitespace from both sides of @a str (modified in place). */
-void
-svn_stringbuf_strip_whitespace(svn_stringbuf_t *str);
-
-/** Return position of last occurrence of @a ch in @a str, or return
- * @a str->len if no occurrence.
- */
-apr_size_t
-svn_stringbuf_find_char_backward(const svn_stringbuf_t *str, char ch);
-
-/** Return @c TRUE iff @a str1 and @a str2 have identical length and data. */
-svn_boolean_t
-svn_string_compare_stringbuf(const svn_string_t *str1,
-                             const svn_stringbuf_t *str2);
-
-/** @} */
-
-
-/** C strings.
- *
- * @defgroup svn_string_cstrings c string functions
- * @{
- */
-
-/** Divide @a input into substrings along @a sep_chars boundaries, return an
- * array of copies of those substrings (plain const char*), allocating both
- * the array and the copies in @a pool.
- *
- * None of the elements added to the array contain any of the
- * characters in @a sep_chars, and none of the new elements are empty
- * (thus, it is possible that the returned array will have length
- * zero).
- *
- * If @a chop_whitespace is TRUE, then remove leading and trailing
- * whitespace from the returned strings.
- */
-apr_array_header_t *
-svn_cstring_split(const char *input,
-                  const char *sep_chars,
-                  svn_boolean_t chop_whitespace,
-                  apr_pool_t *pool);
-
-/** Like svn_cstring_split(), but append to existing @a array instead of
- * creating a new one.  Allocate the copied substrings in @a pool
- * (i.e., caller decides whether or not to pass @a array->pool as @a pool).
- */
-void
-svn_cstring_split_append(apr_array_header_t *array,
-                         const char *input,
-                         const char *sep_chars,
-                         svn_boolean_t chop_whitespace,
-                         apr_pool_t *pool);
-
-
-/** Return @c TRUE iff @a str matches any of the elements of @a list, a list
- * of zero or more glob patterns.
- */
-svn_boolean_t
-svn_cstring_match_glob_list(const char *str, const apr_array_header_t *list);
-
-/** Return @c TRUE iff @a str exactly matches any of the elements of @a list.
- *
- * @since new in 1.7
- */
-svn_boolean_t
-svn_cstring_match_list(const char *str, const apr_array_header_t *list);
-
-/**
- * Return the number of line breaks in @a msg, allowing any kind of newline
- * termination (CR, LF, CRLF, or LFCR), even inconsistent.
- *
- * @since New in 1.2.
- */
-int
-svn_cstring_count_newlines(const char *msg);
-
-/**
- * Return a cstring which is the concatenation of @a strings (an array
- * of char *) each followed by @a separator (that is, @a separator
- * will also end the resulting string).  Allocate the result in @a pool.
- * If @a strings is empty, then return the empty string.
- *
- * @since New in 1.2.
- */
-char *
-svn_cstring_join(const apr_array_header_t *strings,
-                 const char *separator,
-                 apr_pool_t *pool);
-
-/**
- * Compare two strings @a atr1 and @a atr2, treating case-equivalent
- * unaccented Latin (ASCII subset) letters as equal.
- *
- * Returns in integer greater than, equal to, or less than 0,
- * according to whether @a str1 is considered greater than, equal to,
- * or less than @a str2.
- *
- * @since New in 1.5.
- */
-int
-svn_cstring_casecmp(const char *str1, const char *str2);
-
-/**
- * Parse the C string @a str into a 64 bit number, and return it in @a *n.
- * Assume that the number is represented in base @a base.
- * Raise an error if conversion fails (e.g. due to overflow), or if the
- * converted number is smaller than @a minval or larger than @a maxval.
- *
- * @since New in 1.7.
- */
-svn_error_t *
-svn_cstring_strtoi64(apr_int64_t *n, const char *str,
-                     apr_int64_t minval, apr_int64_t maxval,
-                     int base);
-
-/**
- * Parse the C string @a str into a 64 bit number, and return it in @a *n.
- * Assume that the number is represented in base 10.
- * Raise an error if conversion fails (e.g. due to overflow).
- *
- * @since New in 1.7.
- */
-svn_error_t *
-svn_cstring_atoi64(apr_int64_t *n, const char *str);
-
-/**
- * Parse the C string @a str into a 32 bit number, and return it in @a *n.
- * Assume that the number is represented in base 10.
- * Raise an error if conversion fails (e.g. due to overflow).
- *
- * @since New in 1.7.
- */
-svn_error_t *
-svn_cstring_atoi(int *n, const char *str);
-
-/**
- * Parse the C string @a str into an unsigned 64 bit number, and return
- * it in @a *n. Assume that the number is represented in base @a base.
- * Raise an error if conversion fails (e.g. due to overflow), or if the
- * converted number is smaller than @a minval or larger than @a maxval.
- *
- * @since New in 1.7.
- */
-svn_error_t *
-svn_cstring_strtoui64(apr_uint64_t *n, const char *str,
-                      apr_uint64_t minval, apr_uint64_t maxval,
-                      int base);
-
-/**
- * Parse the C string @a str into an unsigned 64 bit number, and return
- * it in @a *n. Assume that the number is represented in base 10.
- * Raise an error if conversion fails (e.g. due to overflow).
- *
- * @since New in 1.7.
- */
-svn_error_t *
-svn_cstring_atoui64(apr_uint64_t *n, const char *str);
-
-/**
- * Parse the C string @a str into an unsigned 32 bit number, and return
- * it in @a *n. Assume that the number is represented in base 10.
- * Raise an error if conversion fails (e.g. due to overflow).
- *
- * @since New in 1.7.
- */
-svn_error_t *
-svn_cstring_atoui(unsigned int *n, const char *str);
-
+svn_stringbuf__morph_into_string(svn_stringbuf_t *strbuf);
 /** @} */
 
 /** @} */
@@ -490,4 +62,4 @@ svn_cstring_atoui(unsigned int *n, const
 }
 #endif /* __cplusplus */
 
-#endif  /* SVN_STRING_H */
+#endif  /* SVN_STRING_PRIVATE_H */

Propchange: subversion/trunk/subversion/include/private/svn_string_private.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: subversion/trunk/subversion/include/private/svn_string_private.h
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Thu Jun  2 13:46:27 2011
@@ -0,0 +1,54 @@
+/subversion/branches/1.5.x-r30215/subversion/include/svn_string.h:870312
+/subversion/branches/atomic-revprop/subversion/include/svn_string.h:965046-1000689
+/subversion/branches/bdb-reverse-deltas/subversion/include/svn_string.h:872050-872529
+/subversion/branches/diff-callbacks3/subversion/include/svn_string.h:870059-870761
+/subversion/branches/diff-optimizations/subversion/include/svn_string.h:1031270-1037352
+/subversion/branches/diff-optimizations-bytes/subversion/include/svn_string.h:1037353-1067789
+/subversion/branches/dont-save-plaintext-passwords-by-default/subversion/include/svn_string.h:870728-871118
+/subversion/branches/double-delete/subversion/include/svn_string.h:870511-872970
+/subversion/branches/explore-wc/subversion/include/svn_string.h:875486,875493,875497,875507,875511,875514,875559,875580-875581,875584,875587,875611,875627,875647,875667-875668,875711-875712,875733-875734,875736,875744-875748,875751,875758,875782,875795-875796,875830,875836,875838,875842,875852,875855,875864,875870,875873,875880,875885-875888,875890,875897-875898,875905,875907-875909,875935,875943-875944,875946,875979,875982-875983,875985-875986,875990,875997
+/subversion/branches/file-externals/subversion/include/svn_string.h:871779-873302
+/subversion/branches/fs-rep-sharing/subversion/include/svn_string.h:869036-873803
+/subversion/branches/fsfs-pack/subversion/include/svn_string.h:873717-874575
+/subversion/branches/gnome-keyring/subversion/include/svn_string.h:870558-871410
+/subversion/branches/http-protocol-v2/subversion/include/svn_string.h:874395-876041
+/subversion/branches/in-memory-cache/subversion/include/svn_string.h:869829-871452
+/subversion/branches/integrate-cache-item-serialization/subversion/include/svn_string.h:1068724-1068739
+/subversion/branches/integrate-cache-membuffer/subversion/include/svn_string.h:998649-998852
+/subversion/branches/integrate-compression-level/subversion/include/svn_string.h:1068651-1072287
+/subversion/branches/integrate-io-improvements/subversion/include/svn_string.h:1068684-1072297
+/subversion/branches/integrate-is-cachable/subversion/include/svn_string.h:1072568-1074082
+/subversion/branches/integrate-partial-getter/subversion/include/svn_string.h:1072558-1076552
+/subversion/branches/integrate-readline-speedup/subversion/include/svn_string.h:1072553-1072555
+/subversion/branches/integrate-stream-api-extensions/subversion/include/svn_string.h:1068695-1072516
+/subversion/branches/integrate-txdelta-caching/subversion/include/svn_string.h:1072541-1078213
+/subversion/branches/issue-2779-dev/subversion/include/svn_string.h:965496-984198
+/subversion/branches/issue-2843-dev/subversion/include/svn_string.h:871432-874179
+/subversion/branches/issue-3000/subversion/include/svn_string.h:871713,871716-871719,871721-871726,871728,871734
+/subversion/branches/issue-3067-deleted-subtrees/subversion/include/svn_string.h:873375-874084
+/subversion/branches/issue-3148-dev/subversion/include/svn_string.h:875193-875204
+/subversion/branches/issue-3220-dev/subversion/include/svn_string.h:872210-872226
+/subversion/branches/issue-3242-dev/subversion/include/svn_string.h:879653-896436
+/subversion/branches/issue-3334-dirs/subversion/include/svn_string.h:875156-875867
+/subversion/branches/issue-3668-3669/subversion/include/svn_string.h:1031000-1035744
+/subversion/branches/kwallet/subversion/include/svn_string.h:870785-871314
+/subversion/branches/log-g-performance/subversion/include/svn_string.h:870941-871032
+/subversion/branches/merge-skips-obstructions/subversion/include/svn_string.h:874525-874615
+/subversion/branches/nfc-nfd-aware-client/subversion/include/svn_string.h:870276,870376
+/subversion/branches/performance/subversion/include/svn_string.h:979193,980118,981087,981090,981189,981194,981287,981684,981827,982043,982355,983398,983406,983430,983474,983488,983490,983760,983764,983766,983770,984927,984973,984984,985014,985037,985046,985472,985477,985482,985487-985488,985493,985497,985500,985514,985601,985603,985606,985669,985695,986453,986465,986485,986491-986492,986517,986521,986605,986608,986817,986832,987865,987868-987869,987872,987886-987888,987893,988319,988898,990330,990533,990535-990537,990541,990568,990572,990574-990575,990600,990759,992899,992904,992911,993127,993141,994956,995478,995507,995603,998012,998858,999098,1001413,1001417,1004291,1022668,1022670,1022676,1022715,1022719,1025660,1025672,1027193,1027203,1027206,1027214,1027227,1028077,1028092,1028094,1028104,1028107,1028111,1028354,1029038,1029042-1029043,1029054-1029055,1029062-1029063,1029078,1029080,1029090,1029092-1029093,1029111,1029151,1029158,1029229-1029230,1029232,1029335-1029336,
 1029339-1029340,1029342,1029344,1030763,1030827,1031203,1031235,1032285,1032333,1033040,1033057,1033294,1035869,1035882,1039511,1043705,1053735,1056015,1066452,1067683,1067697-1078365
+/subversion/branches/py-tests-as-modules/subversion/include/svn_string.h:956579-1033052
+/subversion/branches/ra_serf-digest-authn/subversion/include/svn_string.h:875693-876404
+/subversion/branches/reintegrate-improvements/subversion/include/svn_string.h:873853-874164
+/subversion/branches/subtree-mergeinfo/subversion/include/svn_string.h:876734-878766
+/subversion/branches/svn-mergeinfo-enhancements/subversion/include/svn_string.h:870119-870195,870197-870288
+/subversion/branches/svn-patch-improvements/subversion/include/svn_string.h:918519-934609
+/subversion/branches/svnpatch-diff/subversion/include/svn_string.h:865738-876477
+/subversion/branches/svnraisetc/subversion/include/svn_string.h:874709-875149
+/subversion/branches/svnserve-logging/subversion/include/svn_string.h:869828-870893
+/subversion/branches/tc-issue-3334/subversion/include/svn_string.h:874697-874773
+/subversion/branches/tc-merge-notify/subversion/include/svn_string.h:874017-874062
+/subversion/branches/tc-resolve/subversion/include/svn_string.h:874191-874239
+/subversion/branches/tc_url_rev/subversion/include/svn_string.h:874351-874483
+/subversion/branches/tree-conflicts/subversion/include/svn_string.h:868291-873154
+/subversion/branches/tree-conflicts-notify/subversion/include/svn_string.h:873926-874008
+/subversion/branches/uris-as-urls/subversion/include/svn_string.h:1060426-1064427

Modified: subversion/trunk/subversion/include/svn_string.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_string.h?rev=1130548&r1=1130547&r2=1130548&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_string.h (original)
+++ subversion/trunk/subversion/include/svn_string.h Thu Jun  2 13:46:27 2011
@@ -177,15 +177,6 @@ svn_string_first_non_whitespace(const sv
 apr_size_t
 svn_string_find_char_backward(const svn_string_t *str, char ch);
 
-/** Returns the @a svn_string_t information contained in the data and
- * len members of @a strbuf. This is effectively a typecast, converting
- * @a strbuf into an svn_string_t. This first will become invalid and must
- * not be accessed after this function returned.
- */
-svn_string_t *
-svn_string_from_stringbuf(svn_stringbuf_t *strbuf);
-/** @} */
-
 
 /** svn_stringbuf_t functions.
  *

Modified: subversion/trunk/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/patch.c?rev=1130548&r1=1130547&r2=1130548&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/patch.c (original)
+++ subversion/trunk/subversion/libsvn_client/patch.c Thu Jun  2 13:46:27 2011
@@ -46,6 +46,7 @@
 #include "private/svn_eol_private.h"
 #include "private/svn_wc_private.h"
 #include "private/svn_dep_compat.h"
+#include "private/svn_string_private.h"
 
 typedef struct hunk_info_t {
   /* The hunk. */
@@ -2283,7 +2284,7 @@ install_patched_prop_targets(patch_targe
         }
 
       /* Attempt to set the property, and reject all hunks if this fails. */
-      prop_val = svn_string_from_stringbuf(prop_content);
+      prop_val = svn_stringbuf__morph_into_string(prop_content);
       if (dry_run)
         {
           const svn_string_t *canon_propval;

Modified: subversion/trunk/subversion/libsvn_ra_svn/marshal.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/marshal.c?rev=1130548&r1=1130547&r2=1130548&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_svn/marshal.c (original)
+++ subversion/trunk/subversion/libsvn_ra_svn/marshal.c Thu Jun  2 13:46:27 2011
@@ -42,6 +42,8 @@
 
 #include "ra_svn.h"
 
+#include "private/svn_string_private.h"
+
 #define svn_iswhitespace(c) ((c) == ' ' || (c) == '\n')
 
 /* If we receive data that *claims* to be followed by a very long string,
@@ -642,7 +644,7 @@ static svn_error_t *read_string(svn_ra_s
    * data and len members in stringbuf. 
    */
   item->kind = SVN_RA_SVN_STRING;
-  item->u.string = svn_string_from_stringbuf(stringbuf);
+  item->u.string = svn_stringbuf__morph_into_string(stringbuf);
 
   return SVN_NO_ERROR;
 }

Modified: subversion/trunk/subversion/libsvn_repos/hooks.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/hooks.c?rev=1130548&r1=1130547&r2=1130548&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/hooks.c (original)
+++ subversion/trunk/subversion/libsvn_repos/hooks.c Thu Jun  2 13:46:27 2011
@@ -36,6 +36,7 @@
 #include "svn_private_config.h"
 #include "private/svn_fs_private.h"
 #include "private/svn_repos_private.h"
+#include "private/svn_string_private.h"
 
 
 
@@ -226,7 +227,7 @@ run_hook_cmd(svn_string_t **result,
         return svn_error_wrap_apr
           (apr_err, _("Error closing read end of stderr pipe"));
 
-      *result = svn_string_from_stringbuf(native_stdout);
+      *result = svn_stringbuf__morph_into_string(native_stdout);
     }
   else
     {
@@ -394,7 +395,7 @@ lock_token_content(apr_file_t **handle, 
 
   svn_stringbuf_appendcstr(lock_str, "\n");
   return create_temp_file(handle,
-                          svn_string_from_stringbuf(lock_str), pool);
+                          svn_stringbuf__morph_into_string(lock_str), pool);
 }
 
 

Modified: subversion/trunk/subversion/libsvn_subr/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/mergeinfo.c?rev=1130548&r1=1130547&r2=1130548&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/mergeinfo.c (original)
+++ subversion/trunk/subversion/libsvn_subr/mergeinfo.c Thu Jun  2 13:46:27 2011
@@ -34,6 +34,7 @@
 #include "svn_mergeinfo.h"
 #include "private/svn_fspath.h"
 #include "private/svn_mergeinfo_private.h"
+#include "private/svn_string_private.h"
 #include "svn_private_config.h"
 #include "svn_hash.h"
 
@@ -1506,7 +1507,7 @@ svn_rangelist_to_string(svn_string_t **o
       svn_stringbuf_appendcstr(buf, range_to_string(range, pool));
     }
 
-    *output = svn_string_from_stringbuf(buf);
+  *output = svn_stringbuf__morph_into_string(buf);
 
   return SVN_NO_ERROR;
 }
@@ -1560,7 +1561,7 @@ svn_mergeinfo_to_string(svn_string_t **o
     {
       svn_stringbuf_t *mergeinfo_buf;
       SVN_ERR(mergeinfo_to_stringbuf(&mergeinfo_buf, input, NULL, pool));
-      *output = svn_string_from_stringbuf(mergeinfo_buf);
+      *output = svn_stringbuf__morph_into_string(mergeinfo_buf);
     }
   else
     {
@@ -1930,7 +1931,7 @@ svn_mergeinfo__catalog_to_formatted_stri
      otherwise, return a new string containing only a newline
      character.  */
   if (output_buf)
-    *output = svn_string_from_stringbuf(output_buf);
+    *output = svn_stringbuf__morph_into_string(output_buf);
   else
     *output = svn_string_create("\n", pool);
 
@@ -1964,7 +1965,7 @@ svn_mergeinfo__to_formatted_string(svn_s
     }
 #endif
 
-  *output = output_buf ? svn_string_from_stringbuf(output_buf)
+  *output = output_buf ? svn_stringbuf__morph_into_string(output_buf)
                        : svn_string_create("", pool);
   return SVN_NO_ERROR;
 }

Modified: subversion/trunk/subversion/libsvn_subr/subst.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/subst.c?rev=1130548&r1=1130547&r2=1130548&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/subst.c (original)
+++ subversion/trunk/subversion/libsvn_subr/subst.c Thu Jun  2 13:46:27 2011
@@ -48,6 +48,7 @@
 
 #include "svn_private_config.h"
 
+#include "private/svn_string_private.h"
 
 /**
  * The textual elements of a detranslated special file.  One of these
@@ -230,7 +231,7 @@ keyword_printf(const char *fmt,
       fmt = cur + 2;
     }
 
-  return svn_string_from_stringbuf(value);
+  return svn_stringbuf__morph_into_string(value);
 }
 
 svn_error_t *

Modified: subversion/trunk/subversion/libsvn_subr/svn_string.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/svn_string.c?rev=1130548&r1=1130547&r2=1130548&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/svn_string.c (original)
+++ subversion/trunk/subversion/libsvn_subr/svn_string.c Thu Jun  2 13:46:27 2011
@@ -236,7 +236,7 @@ svn_string_find_char_backward(const svn_
 }
 
 svn_string_t *
-svn_string_from_stringbuf(svn_stringbuf_t *strbuf)
+svn_stringbuf__morph_into_string(svn_stringbuf_t *strbuf)
 {
   /* In debug mode, detect attempts to modify the original STRBUF object.
    */

Modified: subversion/trunk/subversion/libsvn_subr/utf.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/utf.c?rev=1130548&r1=1130547&r2=1130548&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/utf.c (original)
+++ subversion/trunk/subversion/libsvn_subr/utf.c Thu Jun  2 13:46:27 2011
@@ -41,6 +41,7 @@
 
 #include "private/svn_utf_private.h"
 #include "private/svn_dep_compat.h"
+#include "private/svn_string_private.h"
 
 
 
@@ -740,7 +741,7 @@ svn_utf_string_to_utf8(const svn_string_
       if (! err)
         err = check_utf8(destbuf->data, destbuf->len, pool);
       if (! err)
-        *dest = svn_string_from_stringbuf(destbuf);
+        *dest = svn_stringbuf__morph_into_string(destbuf);
     }
   else
     {
@@ -876,7 +877,7 @@ svn_utf_string_from_utf8(const svn_strin
         err = convert_to_stringbuf(node, src->data, src->len,
                                    &dbuf, pool);
       if (! err)
-        *dest = svn_string_from_stringbuf(dbuf);
+        *dest = svn_stringbuf__morph_into_string(dbuf);
     }
   else
     {

Modified: subversion/trunk/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/props.c?rev=1130548&r1=1130547&r2=1130548&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/props.c (original)
+++ subversion/trunk/subversion/libsvn_wc/props.c Thu Jun  2 13:46:27 2011
@@ -50,6 +50,7 @@
 #include "private/svn_wc_private.h"
 #include "private/svn_mergeinfo_private.h"
 #include "private/svn_skel.h"
+#include "private/svn_string_private.h"
 
 #include "wc.h"
 #include "props.h"
@@ -925,7 +926,7 @@ maybe_generate_propconflict(svn_boolean_
                                                     result->merged_file :
                                                     cdesc->merged_file,
                                                scratch_pool));
-              merged_string = svn_string_from_stringbuf(merged_stringbuf);
+              merged_string = svn_stringbuf__morph_into_string(merged_stringbuf);
               apr_hash_set(working_props, propname,
                            APR_HASH_KEY_STRING, merged_string);
               *conflict_remains = FALSE;
@@ -2482,7 +2483,7 @@ svn_wc_canonicalize_svn_prop(const svn_s
     }
 
   if (new_value)
-    *propval_p = svn_string_from_stringbuf(new_value);
+    *propval_p = svn_stringbuf__morph_into_string(new_value);
   else
     *propval_p = propval;
 

Modified: subversion/trunk/subversion/svn/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/util.c?rev=1130548&r1=1130547&r2=1130548&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/util.c (original)
+++ subversion/trunk/subversion/svn/util.c Thu Jun  2 13:46:27 2011
@@ -62,6 +62,7 @@
 #include "private/svn_token.h"
 #include "private/svn_opt_private.h"
 #include "private/svn_client_private.h"
+#include "private/svn_string_private.h"
 
 
 
@@ -481,7 +482,7 @@ svn_cl__edit_string_externally(svn_strin
       if (err)
         goto cleanup;
 
-      *edited_contents = svn_string_from_stringbuf(edited_contents_s);
+      *edited_contents = svn_stringbuf__morph_into_string(edited_contents_s);
 
       /* Translate back to UTF8/LF if desired. */
       if (as_text)



Mime
View raw message