diff options
author | defanor <defanor@uberspace.net> | 2023-09-07 14:32:41 +0300 |
---|---|---|
committer | defanor <defanor@uberspace.net> | 2023-09-07 18:03:30 +0300 |
commit | e3d8e7d63bb3e1ccd38ce5ca8ca9c94f995612d6 (patch) | |
tree | da034f90f6365edaf15c87cd7996fa339ffeded5 /src/rexmpp.rs | |
parent | 1e01dbfc114e4ff96c428d1db38a4908ba8d0438 (diff) |
Build rexmpp_xml_t directly on SAX parsing
Afterwards it is used for the input queue, too.
Diffstat (limited to 'src/rexmpp.rs')
-rw-r--r-- | src/rexmpp.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/rexmpp.rs b/src/rexmpp.rs index 92b6fa0..b8057ba 100644 --- a/src/rexmpp.rs +++ b/src/rexmpp.rs @@ -233,13 +233,17 @@ pub struct Rexmpp { // A queue of XML elements to send pub send_queue: *mut rexmpp_xml::RexmppXML, + // An input queue of parsed XML structures + pub input_queue: *mut rexmpp_xml::RexmppXML, + pub input_queue_last: *mut rexmpp_xml::RexmppXML, + // XML parser context, and current element pointer for building // XML nodes with a SAX2 parser interface pub xml_parser: *mut c_void, - pub current_element_root: *mut c_void, - pub current_element: *mut c_void, - pub input_queue: *mut c_void, - pub input_queue_last: *mut c_void, + + // The children are stored in reverse order during building + pub current_element_root: *mut rexmpp_xml::RexmppXML, + pub current_element: *mut rexmpp_xml::RexmppXML, // TLS structures pub tls: *mut c_void, |