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/03/27 20:45:26 UTC
svn commit: r1461823 -
/subversion/branches/fsfs-format7/subversion/libsvn_subr/string.c
Author: stefan2
Date: Wed Mar 27 19:45:25 2013
New Revision: 1461823
URL: http://svn.apache.org/r1461823
Log:
On the fsfs-format7 branch: Allow svn_stringbuf_ts to be only
temporarily converted to svn_string_t, i.e. don't modify them.
This is fine since svn_string_ts are considered immutable.
* subversion/libsvn_subr/string.c
(svn_stringbuf__morph_into_string): remove paranoia debug code
Modified:
subversion/branches/fsfs-format7/subversion/libsvn_subr/string.c
Modified: subversion/branches/fsfs-format7/subversion/libsvn_subr/string.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_subr/string.c?rev=1461823&r1=1461822&r2=1461823&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_subr/string.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_subr/string.c Wed Mar 27 19:45:25 2013
@@ -331,13 +331,6 @@ svn_string_find_char_backward(const svn_
svn_string_t *
svn_stringbuf__morph_into_string(svn_stringbuf_t *strbuf)
{
- /* In debug mode, detect attempts to modify the original STRBUF object.
- */
-#ifdef SVN_DEBUG
- strbuf->pool = NULL;
- strbuf->blocksize = strbuf->len + 1;
-#endif
-
/* Both, svn_string_t and svn_stringbuf_t are public API structures
* since the svn epoch. Thus, we can rely on their precise layout not
* to change.
Re: svn commit: r1461823 - /subversion/branches/fsfs-format7/subversion/libsvn_subr/string.c
Posted by Stefan Fuhrmann <st...@wandisco.com>.
On Wed, Mar 27, 2013 at 9:15 PM, Julian Foad <ju...@btopenworld.com>wrote:
> Stefan, the point of that debug code was to prevent anything from later
> modifying the original svn_stringbuf_t object, because that could change or
> invalidate the memory pointed to by the new svn_string_t alias.
>
I know - I wrote that code ;)
As of r1461851, the change is no longer needed,
so I reverted it just now in r1462438.
-- Stefan^2.
--
*Join one of our free daily demo sessions on* *Scaling Subversion for the
Enterprise <http://www.wandisco.com/training/webinars>*
*
*
Re: svn commit: r1461823 - /subversion/branches/fsfs-format7/subversion/libsvn_subr/string.c
Posted by Julian Foad <ju...@btopenworld.com>.
Stefan, the point of that debug code was to prevent anything from later modifying the original svn_stringbuf_t object, because that could change or invalidate the memory pointed to by the new svn_string_t alias.
- Julian
> Author: stefan2
> Date: Wed Mar 27 19:45:25 2013
> New Revision: 1461823
>
> URL: http://svn.apache.org/r1461823
> Log:
> On the fsfs-format7 branch: Allow svn_stringbuf_ts to be only
> temporarily converted to svn_string_t, i.e. don't modify them.
> This is fine since svn_string_ts are considered immutable.
>
> * subversion/libsvn_subr/string.c
> (svn_stringbuf__morph_into_string): remove paranoia debug code
>
> Modified: subversion/branches/fsfs-format7/subversion/libsvn_subr/string.c
> ==============================================================================
> svn_string_t *
> svn_stringbuf__morph_into_string(svn_stringbuf_t *strbuf)
> {
> - /* In debug mode, detect attempts to modify the original STRBUF object.
> - */
> -#ifdef SVN_DEBUG
> - strbuf->pool = NULL;
> - strbuf->blocksize = strbuf->len + 1;
> -#endif
> -
> /* Both, svn_string_t and svn_stringbuf_t are public API structures
> * since the svn epoch. Thus, we can rely on their precise layout not
> * to change.