You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2014/01/10 19:41:47 UTC
svn commit: r1557216 - in /subversion/trunk/subversion/libsvn_ra_serf:
inherited_props.c property.c ra_serf.h replay.c update.c util.c xml.c
Author: rhuijben
Date: Fri Jan 10 18:41:47 2014
New Revision: 1557216
URL: http://svn.apache.org/r1557216
Log:
Following up on r1557207, remove the old style xml parser from the ra_serf
internal api.
* subversion/libsvn_ra_serf/inherited_props.c
(get_iprops_via_more_requests): Update caller.
* subversion/libsvn_ra_serf/property.c
(propfind_context_t): Remove done list support.
(propfind_closed): Don't add to done list.
(svn_ra_serf__deliver_props): Remove unused argument.
* subversion/libsvn_ra_serf/ra_serf.h
(ns_t): Move to xml.c
(ra_serf_list_t): Move to replay.c
(svn_ra_serf__xml_state_t,
svn_ra_serf__xml_parser_t,
svn_ra_serf__xml_start_element_t,
svn_ra_serf__xml_end_element_t,
svn_ra_serf__xml_cdata_chunk_handler_t,
svn_ra_serf__xml_parser_t): Remove.
(svn_ra_serf__handle_xml_parser,
svn_ra_serf__xml_push_state,
svn_ra_serf__xml_pop_state,
svn_ra_serf__define_ns): Remove unused functions.
(svn_ra_serf__expand_ns): Hide from internal api.
(svn_ra_serf__deliver_props): Remove unused argument.
* subversion/libsvn_ra_serf/replay.c
(ra_serf_list_t): Move definition here.
(svn_ra_serf__replay_range): Update caller.
* subversion/libsvn_ra_serf/update.c
(fetch_for_file,
fetch_for_dir): Update caller.
* subversion/libsvn_ra_serf/util.c
(start_xml,
end_xml,
cdata_xml,
add_done_item): Remove functions.
(svn_ra_serf__handle_xml_parser): Remove function.
* subversion/libsvn_ra_serf/xml.c
(svn_ra_serf__ns_t): Move definition here.
(svn_ra_serf__define_ns): Remove function.
(svn_ra_serf__expand_ns): Rename to ...
(expand_ns): ... this and make static.
(svn_ra_serf__xml_push_state,
svn_ra_serf__xml_pop_state): Remove functions.
(svn_ra_serf__xml_cb_start): Update caller.
Modified:
subversion/trunk/subversion/libsvn_ra_serf/inherited_props.c
subversion/trunk/subversion/libsvn_ra_serf/property.c
subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h
subversion/trunk/subversion/libsvn_ra_serf/replay.c
subversion/trunk/subversion/libsvn_ra_serf/update.c
subversion/trunk/subversion/libsvn_ra_serf/util.c
subversion/trunk/subversion/libsvn_ra_serf/xml.c
Modified: subversion/trunk/subversion/libsvn_ra_serf/inherited_props.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/inherited_props.c?rev=1557216&r1=1557215&r2=1557216&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/inherited_props.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/inherited_props.c Fri Jan 10 18:41:47 2014
@@ -297,7 +297,7 @@ get_iprops_via_more_requests(svn_ra_sess
SVN_ERR(svn_ra_serf__deliver_props(&rq->handler, rq->props, session,
session->conns[0], rq->urlpath,
rev_marker, "0", all_props,
- NULL, scratch_pool));
+ scratch_pool));
/* Allow ignoring authz problems */
rq->handler->no_fail_on_http_failure_status = TRUE;
Modified: subversion/trunk/subversion/libsvn_ra_serf/property.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/property.c?rev=1557216&r1=1557215&r2=1557216&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/property.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/property.c Fri Jan 10 18:41:47 2014
@@ -94,12 +94,6 @@ typedef struct propfind_context_t {
* "good"; otherwise, they'll get discarded.
*/
apr_hash_t *ps_props;
-
- /* If not-NULL, add us to this list when we're done. */
- svn_ra_serf__list_t **done_list;
-
- svn_ra_serf__list_t done_item;
-
} propfind_context_t;
@@ -222,12 +216,6 @@ propfind_closed(svn_ra_serf__xml_estate_
onto the "done list". External callers will then know this
request has been completed (tho stray response bytes may still
arrive). */
- if (ctx->done_list)
- {
- ctx->done_item.data = ctx->handler;
- ctx->done_item.next = *ctx->done_list;
- *ctx->done_list = &ctx->done_item;
- }
}
else if (leaving_state == HREF)
{
@@ -572,7 +560,6 @@ svn_ra_serf__deliver_props(svn_ra_serf__
svn_revnum_t rev,
const char *depth,
const svn_ra_serf__dav_props_t *find_props,
- svn_ra_serf__list_t **done_list,
apr_pool_t *pool)
{
propfind_context_t *new_prop_ctx;
@@ -589,7 +576,6 @@ svn_ra_serf__deliver_props(svn_ra_serf__
new_prop_ctx->sess = sess;
new_prop_ctx->conn = conn;
new_prop_ctx->rev = rev;
- new_prop_ctx->done_list = done_list;
if (SVN_IS_VALID_REVNUM(rev))
{
@@ -664,7 +650,7 @@ svn_ra_serf__retrieve_props(apr_hash_t *
*results = apr_hash_make(result_pool);
SVN_ERR(svn_ra_serf__deliver_props(&handler, *results, sess, conn, url,
- rev, depth, props, NULL, result_pool));
+ rev, depth, props, result_pool));
SVN_ERR(svn_ra_serf__wait_for_props(handler, scratch_pool));
return SVN_NO_ERROR;
Modified: subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h?rev=1557216&r1=1557215&r2=1557216&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h Fri Jan 10 18:41:47 2014
@@ -271,26 +271,6 @@ typedef struct svn_ra_serf__dav_props_t
const char *name;
} svn_ra_serf__dav_props_t;
-/*
- * Structure which represents an XML namespace.
- */
-typedef struct ns_t {
- /* The assigned name. */
- const char *xmlns;
- /* The full URL for this namespace. */
- const char *url;
- /* The next namespace in our list. */
- struct ns_t *next;
-} svn_ra_serf__ns_t;
-
-/*
- * An incredibly simple list.
- */
-typedef struct ra_serf_list_t {
- void *data;
- struct ra_serf_list_t *next;
-} svn_ra_serf__list_t;
-
/** DAV property sets **/
static const svn_ra_serf__dav_props_t base_props[] =
@@ -553,114 +533,6 @@ svn_ra_serf__context_run_one(svn_ra_serf
*/
void svn_ra_serf__request_create(svn_ra_serf__handler_t *handler);
-/* XML helper callbacks. */
-
-typedef struct svn_ra_serf__xml_state_t {
- /* A numeric value that represents the current state in parsing.
- *
- * Value 0 is reserved for use as the default state.
- */
- int current_state;
-
- /* Private pointer set by the parsing code. */
- void *private;
-
- /* Allocations should be made in this pool to match the lifetime of the
- * state.
- */
- apr_pool_t *pool;
-
- /* The currently-declared namespace for this state. */
- svn_ra_serf__ns_t *ns_list;
-
- /* Our previous states. */
- struct svn_ra_serf__xml_state_t *prev;
-} svn_ra_serf__xml_state_t;
-
-/* Forward declaration of the XML parser structure. */
-typedef struct svn_ra_serf__xml_parser_t svn_ra_serf__xml_parser_t;
-
-/* Callback invoked with @a baton by our XML @a parser when an element with
- * the @a name containing @a attrs is opened.
- */
-typedef svn_error_t *
-(*svn_ra_serf__xml_start_element_t)(svn_ra_serf__xml_parser_t *parser,
- svn_ra_serf__dav_props_t name,
- const char **attrs,
- apr_pool_t *scratch_pool);
-
-/* Callback invoked with @a baton by our XML @a parser when an element with
- * the @a name is closed.
- */
-typedef svn_error_t *
-(*svn_ra_serf__xml_end_element_t)(svn_ra_serf__xml_parser_t *parser,
- svn_ra_serf__dav_props_t name,
- apr_pool_t *scratch_pool);
-
-/* Callback invoked with @a baton by our XML @a parser when a CDATA portion
- * of @a data with size @a len is encountered.
- *
- * This may be invoked multiple times for the same tag.
- */
-typedef svn_error_t *
-(*svn_ra_serf__xml_cdata_chunk_handler_t)(svn_ra_serf__xml_parser_t *parser,
- const char *data,
- apr_size_t len,
- apr_pool_t *scratch_pool);
-
-/*
- * Helper structure associated with handle_xml_parser handler that will
- * specify how an XML response will be processed.
- */
-struct svn_ra_serf__xml_parser_t {
- /* Temporary allocations should be made in this pool. */
- apr_pool_t *pool;
-
- /* What kind of response are we parsing? If set, this should typically
- define the report name. */
- const char *response_type;
-
- /* Caller-specific data passed to the start, end, cdata callbacks. */
- void *user_data;
-
- /* Callback invoked when a tag is opened. */
- svn_ra_serf__xml_start_element_t start;
-
- /* Callback invoked when a tag is closed. */
- svn_ra_serf__xml_end_element_t end;
-
- /* Callback invoked when a cdata chunk is received. */
- svn_ra_serf__xml_cdata_chunk_handler_t cdata;
-
- /* Our associated expat-based XML parser. */
- XML_Parser xmlp;
-
- /* Our current state. */
- svn_ra_serf__xml_state_t *state;
-
- /* Our previously used states (will be reused). */
- svn_ra_serf__xml_state_t *free_state;
-
- /* If non-NULL, this value will be set to TRUE when the response is
- * completed.
- */
- svn_boolean_t *done;
-
- /* If non-NULL, when this parser completes, it will add done_item to
- * the list.
- */
- svn_ra_serf__list_t **done_list;
-
- /* A pointer to the item that will be inserted into the list upon
- * completeion.
- */
- svn_ra_serf__list_t *done_item;
-
- /* If an error occurred, this value will be non-NULL. */
- svn_error_t *error;
-};
-
-
/* v2 of the XML parsing functions */
/* The XML parsing context. */
@@ -982,23 +854,6 @@ svn_error_t *
svn_ra_serf__server_error_create(svn_ra_serf__handler_t *handler,
apr_pool_t *scratch_pool);
-
-/*
- * This function will feed the RESPONSE body into XMLP. When parsing is
- * completed (i.e. an EOF is received), *DONE is set to TRUE.
- * Implements svn_ra_serf__response_handler_t.
- *
- * If an error occurs during processing RESP_ERR is invoked with the
- * RESP_ERR_BATON.
- *
- * Temporary allocations are made in POOL.
- */
-svn_error_t *
-svn_ra_serf__handle_xml_parser(serf_request_t *request,
- serf_bucket_t *response,
- void *handler_baton,
- apr_pool_t *pool);
-
/* serf_response_handler_t implementation that completely discards
* the response.
*
@@ -1011,22 +866,6 @@ svn_ra_serf__response_discard_handler(se
apr_pool_t *pool);
-/** XML helper functions. **/
-
-/*
- * Advance the internal XML @a parser to the @a state.
- */
-void
-svn_ra_serf__xml_push_state(svn_ra_serf__xml_parser_t *parser,
- int state);
-
-/*
- * Return to the previous internal XML @a parser state.
- */
-void
-svn_ra_serf__xml_pop_state(svn_ra_serf__xml_parser_t *parser);
-
-
/*
* Add the appropriate serf buckets to @a agg_bucket represented by
* the XML * @a tag and @a value.
@@ -1089,28 +928,6 @@ void
svn_ra_serf__add_cdata_len_buckets(serf_bucket_t *agg_bucket,
serf_bucket_alloc_t *bkt_alloc,
const char *data, apr_size_t len);
-/*
- * Look up the @a attrs array for namespace definitions and add each one
- * to the @a ns_list of namespaces.
- *
- * New namespaces will be allocated in RESULT_POOL.
- */
-void
-svn_ra_serf__define_ns(svn_ra_serf__ns_t **ns_list,
- const char *const *attrs,
- apr_pool_t *result_pool);
-
-/*
- * Look up @a name in the @a ns_list list for previously declared namespace
- * definitions.
- *
- * Return (in @a *returned_prop_name) a #svn_ra_serf__dav_props_t tuple
- * representing the expanded name.
- */
-void
-svn_ra_serf__expand_ns(svn_ra_serf__dav_props_t *returned_prop_name,
- const svn_ra_serf__ns_t *ns_list,
- const char *name);
/** PROPFIND-related functions **/
@@ -1132,7 +949,6 @@ svn_ra_serf__deliver_props(svn_ra_serf__
svn_revnum_t rev,
const char *depth,
const svn_ra_serf__dav_props_t *lookup_props,
- svn_ra_serf__list_t **done_list,
apr_pool_t *pool);
/*
Modified: subversion/trunk/subversion/libsvn_ra_serf/replay.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/replay.c?rev=1557216&r1=1557215&r2=1557216&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/replay.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/replay.c Fri Jan 10 18:41:47 2014
@@ -112,6 +112,14 @@ static const svn_ra_serf__xml_transition
{ 0 }
};
+/*
+ * An incredibly simple list.
+ */
+typedef struct ra_serf_list_t {
+ void *data;
+ struct ra_serf_list_t *next;
+} svn_ra_serf__list_t;
+
/* Per directory/file state */
typedef struct replay_node_t {
apr_pool_t *pool; /* pool allocating this node's data */
@@ -735,7 +743,6 @@ svn_ra_serf__replay_range(svn_ra_session
replay_ctx->revprop_target,
replay_ctx->revprop_rev,
"0", all_props,
- NULL,
replay_ctx->pool));
/* Spin up the serf request for the PROPFIND. */
Modified: subversion/trunk/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/update.c?rev=1557216&r1=1557215&r2=1557216&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/update.c Fri Jan 10 18:41:47 2014
@@ -1354,7 +1354,7 @@ fetch_for_file(file_baton_t *file,
file->propfind_props,
ctx->sess, conn, file->url,
ctx->target_rev, "0", all_props,
- NULL, file->pool));
+ file->pool));
SVN_ERR_ASSERT(file->propfind_handler);
file->propfind_handler->done_delegate = file_props_done;
@@ -1427,7 +1427,6 @@ fetch_for_dir(dir_baton_t *dir,
dir->propfind_props,
ctx->sess, conn, dir->url,
ctx->target_rev, "0", all_props,
- NULL,
dir->pool));
SVN_ERR_ASSERT(dir->propfind_handler);
Modified: subversion/trunk/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/util.c?rev=1557216&r1=1557215&r2=1557216&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/util.c Fri Jan 10 18:41:47 2014
@@ -1136,105 +1136,6 @@ svn_ra_serf__expect_empty_body(serf_requ
return SVN_NO_ERROR;
}
-/* Conforms to Expat's XML_StartElementHandler */
-static void
-start_xml(void *userData, const char *raw_name, const char **attrs)
-{
- svn_ra_serf__xml_parser_t *parser = userData;
- svn_ra_serf__dav_props_t name;
- apr_pool_t *scratch_pool;
- svn_error_t *err;
-
- if (parser->error)
- return;
-
- if (!parser->state)
- svn_ra_serf__xml_push_state(parser, 0);
-
- /* ### get a real scratch_pool */
- scratch_pool = parser->state->pool;
-
- svn_ra_serf__define_ns(&parser->state->ns_list, attrs, parser->state->pool);
-
- svn_ra_serf__expand_ns(&name, parser->state->ns_list, raw_name);
-
- err = parser->start(parser, name, attrs, scratch_pool);
- if (err && !SERF_BUCKET_READ_ERROR(err->apr_err))
- err = svn_error_create(SVN_ERR_RA_SERF_WRAPPED_ERROR, err, NULL);
-
- parser->error = err;
-}
-
-
-/* Conforms to Expat's XML_EndElementHandler */
-static void
-end_xml(void *userData, const char *raw_name)
-{
- svn_ra_serf__xml_parser_t *parser = userData;
- svn_ra_serf__dav_props_t name;
- svn_error_t *err;
- apr_pool_t *scratch_pool;
-
- if (parser->error)
- return;
-
- /* ### get a real scratch_pool */
- scratch_pool = parser->state->pool;
-
- svn_ra_serf__expand_ns(&name, parser->state->ns_list, raw_name);
-
- err = parser->end(parser, name, scratch_pool);
- if (err && !SERF_BUCKET_READ_ERROR(err->apr_err))
- err = svn_error_create(SVN_ERR_RA_SERF_WRAPPED_ERROR, err, NULL);
-
- parser->error = err;
-}
-
-
-/* Conforms to Expat's XML_CharacterDataHandler */
-static void
-cdata_xml(void *userData, const char *data, int len)
-{
- svn_ra_serf__xml_parser_t *parser = userData;
- svn_error_t *err;
- apr_pool_t *scratch_pool;
-
- if (parser->error)
- return;
-
- if (!parser->state)
- svn_ra_serf__xml_push_state(parser, 0);
-
- /* ### get a real scratch_pool */
- scratch_pool = parser->state->pool;
-
- err = parser->cdata(parser, data, len, scratch_pool);
- if (err && !SERF_BUCKET_READ_ERROR(err->apr_err))
- err = svn_error_create(SVN_ERR_RA_SERF_WRAPPED_ERROR, err, NULL);
-
- parser->error = err;
-}
-
-/* Flip the requisite bits in CTX to indicate that processing of the
- response is complete, adding the current "done item" to the list of
- completed items. */
-static void
-add_done_item(svn_ra_serf__xml_parser_t *ctx)
-{
- /* Make sure we don't add to DONE_LIST twice. */
- if (!*ctx->done)
- {
- *ctx->done = TRUE;
- if (ctx->done_list)
- {
- ctx->done_item->data = ctx->user_data;
- ctx->done_item->next = *ctx->done_list;
- *ctx->done_list = ctx->done_item;
- }
- }
-}
-
-
/* svn_error_t * wrapper around XML_Parse */
static APR_INLINE svn_error_t *
parse_xml(XML_Parser parser, const char *data, apr_size_t len, svn_boolean_t is_final)
@@ -1270,82 +1171,6 @@ xml_parser_cleanup(void *baton)
return APR_SUCCESS;
}
-/* Implements svn_ra_serf__response_handler_t */
-svn_error_t *
-svn_ra_serf__handle_xml_parser(serf_request_t *request,
- serf_bucket_t *response,
- void *baton,
- apr_pool_t *pool)
-{
- apr_status_t status;
- svn_ra_serf__xml_parser_t *ctx = baton;
- svn_error_t *err;
-
- if (!ctx->xmlp)
- {
- ctx->xmlp = XML_ParserCreate(NULL);
- apr_pool_cleanup_register(ctx->pool, &ctx->xmlp, xml_parser_cleanup,
- apr_pool_cleanup_null);
- XML_SetUserData(ctx->xmlp, ctx);
- XML_SetElementHandler(ctx->xmlp, start_xml, end_xml);
- if (ctx->cdata)
- {
- XML_SetCharacterDataHandler(ctx->xmlp, cdata_xml);
- }
- }
-
- while (1)
- {
- const char *data;
- apr_size_t len;
-
- status = serf_bucket_read(response, PARSE_CHUNK_SIZE, &data, &len);
- if (SERF_BUCKET_READ_ERROR(status))
- {
- return svn_ra_serf__wrap_err(status, NULL);
- }
-
- err = parse_xml(ctx->xmlp, data, len, FALSE);
-
- err = svn_error_compose_create(ctx->error, err);
-
- if (err)
- {
- SVN_ERR_ASSERT(ctx->xmlp != NULL);
-
- apr_pool_cleanup_run(ctx->pool, &ctx->xmlp, xml_parser_cleanup);
- add_done_item(ctx);
- return svn_error_trace(err);
- }
-
- if (APR_STATUS_IS_EAGAIN(status))
- {
- return svn_ra_serf__wrap_err(status, NULL);
- }
-
- if (APR_STATUS_IS_EOF(status))
- {
- SVN_ERR_ASSERT(ctx->xmlp != NULL);
-
- err = parse_xml(ctx->xmlp, NULL, 0, TRUE);
-
- err = svn_error_compose_create(ctx->error, err);
-
- apr_pool_cleanup_run(ctx->pool, &ctx->xmlp, xml_parser_cleanup);
-
- SVN_ERR(err);
-
- add_done_item(ctx);
-
- return svn_ra_serf__wrap_err(status, NULL);
- }
-
- /* feed me! */
- }
- /* not reached */
-}
-
-
apr_status_t
svn_ra_serf__credentials_callback(char **username, char **password,
serf_request_t *request, void *baton,
Modified: subversion/trunk/subversion/libsvn_ra_serf/xml.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/xml.c?rev=1557216&r1=1557215&r2=1557216&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/xml.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/xml.c Fri Jan 10 18:41:47 2014
@@ -85,6 +85,16 @@ struct svn_ra_serf__xml_context_t {
};
+/* Structure which represents an XML namespace. */
+typedef struct svn_ra_serf__ns_t {
+ /* The assigned name. */
+ const char *xmlns;
+ /* The full URL for this namespace. */
+ const char *url;
+ /* The next namespace in our list. */
+ struct svn_ra_serf__ns_t *next;
+} svn_ra_serf__ns_t;
+
struct svn_ra_serf__xml_estate_t {
/* The current state value. */
int state;
@@ -172,22 +182,15 @@ define_namespaces(svn_ra_serf__ns_t **ns
}
}
-
-void
-svn_ra_serf__define_ns(svn_ra_serf__ns_t **ns_list,
- const char *const *attrs,
- apr_pool_t *result_pool)
-{
- define_namespaces(ns_list, attrs, NULL /* get_pool */, result_pool);
-}
-
-
/*
- * Look up NAME in the NS_LIST list for previously declared namespace
- * definitions and return a DAV_PROPS_T-tuple that has values.
+ * Look up @a name in the @a ns_list list for previously declared namespace
+ * definitions.
+ *
+ * Return (in @a *returned_prop_name) a #svn_ra_serf__dav_props_t tuple
+ * representing the expanded name.
*/
-void
-svn_ra_serf__expand_ns(svn_ra_serf__dav_props_t *returned_prop_name,
+static void
+expand_ns(svn_ra_serf__dav_props_t *returned_prop_name,
const svn_ra_serf__ns_t *ns_list,
const char *name)
{
@@ -381,54 +384,6 @@ void svn_ra_serf__add_tag_buckets(serf_b
svn_ra_serf__add_close_tag_buckets(agg_bucket, bkt_alloc, tag);
}
-void
-svn_ra_serf__xml_push_state(svn_ra_serf__xml_parser_t *parser,
- int state)
-{
- svn_ra_serf__xml_state_t *new_state;
-
- if (!parser->free_state)
- {
- new_state = apr_palloc(parser->pool, sizeof(*new_state));
- new_state->pool = svn_pool_create(parser->pool);
- }
- else
- {
- new_state = parser->free_state;
- parser->free_state = parser->free_state->prev;
-
- svn_pool_clear(new_state->pool);
- }
-
- if (parser->state)
- {
- new_state->private = parser->state->private;
- new_state->ns_list = parser->state->ns_list;
- }
- else
- {
- new_state->private = NULL;
- new_state->ns_list = NULL;
- }
-
- new_state->current_state = state;
-
- /* Add it to the state chain. */
- new_state->prev = parser->state;
- parser->state = new_state;
-}
-
-void svn_ra_serf__xml_pop_state(svn_ra_serf__xml_parser_t *parser)
-{
- svn_ra_serf__xml_state_t *cur_state;
-
- cur_state = parser->state;
- parser->state = cur_state->prev;
- cur_state->prev = parser->free_state;
- parser->free_state = cur_state;
-}
-
-
/* Return a pool for XES to use for self-alloc (and other specifics). */
static apr_pool_t *
xes_pool(const svn_ra_serf__xml_estate_t *xes)
@@ -641,7 +596,7 @@ svn_ra_serf__xml_cb_start(svn_ra_serf__x
were found. */
define_namespaces(¤t->ns_list, attrs, lazy_create_pool, current);
- svn_ra_serf__expand_ns(&elemname, current->ns_list, raw_name);
+ expand_ns(&elemname, current->ns_list, raw_name);
for (scan = xmlctx->ttable; scan->ns != NULL; ++scan)
{