You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ri...@apache.org on 2025/12/15 22:00:03 UTC
svn commit: r1930607 - in subversion/trunk/subversion: include include/private libsvn_subr tests/libsvn_subr
Author: rinrab
Date: Mon Dec 15 22:00:03 2025
New Revision: 1930607
Log:
Exclude the svn_xml_make_parse_stream() function from the public API by making
it private.
- This function does not have any real usages (yet). That's why we don't want
to include it into 1.15 public API. Let's keep it simple.
- This change also renames svn_xml_make_parse_stream to
svn_xml__make_parse_stream to match naming conventions.
- The function has never been officially released, which justfies its removal
from the public API.
* subversion/include/private/svn_xml_private.h
(): New header file.
(svn_xml__make_parse_stream): New function.
* subversion/include/svn_xml.h
(svn_xml_make_parse_stream): Remove function.
* subversion/libsvn_subr/xml_stream.c
(includes): Add private/svn_xml_private.h
(svn_xml_make_parse_stream): Adjust name.
* subversion/tests/libsvn_subr/xml-test.c
(includes): Add private/svn_xml_private.h
(...): Adjust usages.
Added:
subversion/trunk/subversion/include/private/svn_xml_private.h (contents, props changed)
Modified:
subversion/trunk/subversion/include/svn_xml.h
subversion/trunk/subversion/libsvn_subr/xml_stream.c
subversion/trunk/subversion/tests/libsvn_subr/xml-test.c
Added: subversion/trunk/subversion/include/private/svn_xml_private.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ subversion/trunk/subversion/include/private/svn_xml_private.h Mon Dec 15 22:00:03 2025 (r1930607)
@@ -0,0 +1,46 @@
+/**
+ * @copyright
+ * ====================================================================
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * ====================================================================
+ * @endcopyright
+ *
+ * @file svn_xml_private.h
+ * @brief Private XML API.
+ */
+
+#include <apr.h>
+#include <apr_pools.h>
+
+#include "svn_io.h" /* for svn_stream_t */
+#include "svn_xml.h"
+
+/** Create a stream that wraps the XML parser described at @a parser.
+ *
+ * The stream produced will implement 'write' and 'close' methods. It
+ * will push the data to the parser on write operation, and flush it on
+ * close.
+ *
+ * This stream can be used as a generic writable stream, so the callers
+ * may pipe any data there, for example, using the svn_stream_copy3
+ * function, in case of a file source.
+ */
+svn_stream_t *
+svn_xml__make_parse_stream(svn_xml_parser_t *parser,
+ apr_pool_t *result_pool);
+
Modified: subversion/trunk/subversion/include/svn_xml.h
==============================================================================
--- subversion/trunk/subversion/include/svn_xml.h Mon Dec 15 20:03:17 2025 (r1930606)
+++ subversion/trunk/subversion/include/svn_xml.h Mon Dec 15 22:00:03 2025 (r1930607)
@@ -33,7 +33,6 @@
#include "svn_types.h"
#include "svn_string.h"
-#include "svn_io.h" /* for svn_stream_t */
#ifdef __cplusplus
extern "C" {
@@ -192,22 +191,6 @@ void
svn_xml_free_parser(svn_xml_parser_t *svn_parser);
-/** Create a stream that wraps the XML parser described at @a parser.
- *
- * The stream produced will implement 'write' and 'close' methods. It
- * will push the data to the parser on write operation, and flush it on
- * close.
- *
- * This stream can be used as a generic writable stream, so the callers
- * may pipe any data there, for example, using the svn_stream_copy3
- * function, in case of a file source.
- *
- * @since New in 1.15.
- */
-svn_stream_t *
-svn_xml_make_parse_stream(svn_xml_parser_t *parser,
- apr_pool_t *result_pool);
-
/** Push @a len bytes of xml data in @a buf at @a svn_parser.
*
Modified: subversion/trunk/subversion/libsvn_subr/xml_stream.c
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/xml_stream.c Mon Dec 15 20:03:17 2025 (r1930606)
+++ subversion/trunk/subversion/libsvn_subr/xml_stream.c Mon Dec 15 22:00:03 2025 (r1930607)
@@ -25,6 +25,7 @@
/*** Includes. ***/
+#include "private/svn_xml_private.h"
#include "svn_error.h"
#include "svn_io.h"
#include "svn_xml.h"
@@ -94,7 +95,7 @@ xml_stream_close(void *baton)
/* Public Interface */
svn_stream_t *
-svn_xml_make_parse_stream(svn_xml_parser_t *parser,
+svn_xml__make_parse_stream(svn_xml_parser_t *parser,
apr_pool_t *result_pool)
{
svn_stream_t *result;
Modified: subversion/trunk/subversion/tests/libsvn_subr/xml-test.c
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_subr/xml-test.c Mon Dec 15 20:03:17 2025 (r1930606)
+++ subversion/trunk/subversion/tests/libsvn_subr/xml-test.c Mon Dec 15 22:00:03 2025 (r1930607)
@@ -22,6 +22,7 @@
#include <apr.h>
+#include "private/svn_xml_private.h"
#include "svn_pools.h"
#include "svn_string.h"
#include "svn_xml.h"
@@ -343,7 +344,7 @@ test_xml_parse_stream(apr_pool_t *pool)
b.buf = svn_stringbuf_create_empty(pool);
b.parser = svn_xml_make_parser(&b, strbuf_start_elem, strbuf_end_elem,
strbuf_cdata, pool);
- stream = svn_xml_make_parse_stream(b.parser, pool);
+ stream = svn_xml__make_parse_stream(b.parser, pool);
SVN_ERR(svn_stream_puts(stream, xml));
SVN_ERR(svn_stream_close(stream));
@@ -366,7 +367,7 @@ test_xml_parse_stream_invalid_xml(apr_po
b.buf = svn_stringbuf_create_empty(pool);
b.parser = svn_xml_make_parser(&b, strbuf_start_elem, strbuf_end_elem,
strbuf_cdata, pool);
- stream = svn_xml_make_parse_stream(b.parser, pool);
+ stream = svn_xml__make_parse_stream(b.parser, pool);
err = svn_error_compose_create(svn_stream_puts(stream, xml),
svn_stream_close(stream));