summaryrefslogtreecommitdiff
path: root/src/rexmpp.h
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2023-09-07 14:32:41 +0300
committerdefanor <defanor@uberspace.net>2023-09-07 18:03:30 +0300
commite3d8e7d63bb3e1ccd38ce5ca8ca9c94f995612d6 (patch)
treeda034f90f6365edaf15c87cd7996fa339ffeded5 /src/rexmpp.h
parent1e01dbfc114e4ff96c428d1db38a4908ba8d0438 (diff)
Build rexmpp_xml_t directly on SAX parsing
Afterwards it is used for the input queue, too.
Diffstat (limited to 'src/rexmpp.h')
-rw-r--r--src/rexmpp.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/rexmpp.h b/src/rexmpp.h
index 8211886..4cde101 100644
--- a/src/rexmpp.h
+++ b/src/rexmpp.h
@@ -368,13 +368,17 @@ struct rexmpp
/* A queue of XML elements to send. */
rexmpp_xml_t *send_queue;
+ /* An input queue of parsed XML structures. */
+ rexmpp_xml_t *input_queue;
+ rexmpp_xml_t *input_queue_last;
+
/* XML parser context, and current element pointer for building
XML nodes with a SAX2 parser interface. */
xmlParserCtxtPtr xml_parser;
- xmlNodePtr current_element_root;
- xmlNodePtr current_element;
- xmlNodePtr input_queue;
- xmlNodePtr input_queue_last;
+
+ /* The children are stored in reverse order during building. */
+ rexmpp_xml_t *current_element_root;
+ rexmpp_xml_t *current_element;
/* TLS structures. */
rexmpp_tls_t *tls;