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 2017/05/21 18:07:30 UTC
svn commit: r1795714 - /subversion/trunk/subversion/libsvn_ra_svn/marshal.c
Author: stefan2
Date: Sun May 21 18:07:29 2017
New Revision: 1795714
URL: http://svn.apache.org/viewvc?rev=1795714&view=rev
Log:
In ra_svn, document that optional sub-tuples are currently not supported
and how that makes the current handling of optional parameters in nested
sub-tuples correct.
No functional change.
* subversion/libsvn_ra_svn/marshal.c
(vwrite_tuple): Add commentary.
Modified:
subversion/trunk/subversion/libsvn_ra_svn/marshal.c
Modified: subversion/trunk/subversion/libsvn_ra_svn/marshal.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/marshal.c?rev=1795714&r1=1795713&r2=1795714&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_svn/marshal.c (original)
+++ subversion/trunk/subversion/libsvn_ra_svn/marshal.c Sun May 21 18:07:29 2017
@@ -1142,10 +1142,17 @@ static svn_error_t *vwrite_tuple(svn_ra_
SVN_ERR(opt ? vwrite_tuple_string_opt(conn, pool, ap)
: vwrite_tuple_string(conn, pool, ap));
else if (*fmt == '(' && !opt)
- SVN_ERR(write_tuple_start_list(conn, pool));
+ {
+ /* Optional sub-tuples are not supported.
+ * If OPT was set, we would fall through to the malfunction call. */
+ vwrite_tuple_string_opt(conn, pool, ap);
+ }
else if (*fmt == ')')
{
SVN_ERR(write_tuple_end_list(conn, pool));
+
+ /* OPT could not have been set when opening the list (see above),
+ * hence this is correct and handles nested tuples just fine. */
opt = FALSE;
}
else if (*fmt == '?')