mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 13:12:03 +00:00
Add switch_xml_parse_str_dynamic and switch_xml_parse_str_dup
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13255 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -98,6 +98,21 @@ struct switch_xml {
|
||||
uint32_t flags;
|
||||
};
|
||||
|
||||
/*!
|
||||
* \brief Parses a string into a switch_xml_t, ensuring the memory will be freed with switch_xml_free
|
||||
* \param s The string to parse
|
||||
* \param dup true if you want the string to be strdup()'d automatically
|
||||
* \return the switch_xml_t or NULL if an error occured
|
||||
*/
|
||||
SWITCH_DECLARE(switch_xml_t) switch_xml_parse_str_dynamic(char *s, switch_bool_t dup);
|
||||
|
||||
/*!
|
||||
* \brief Parses a string into a switch_xml_t
|
||||
* \param s The string to parse
|
||||
* \return the switch_xml_t or NULL if an error occured
|
||||
*/
|
||||
#define switch_xml_parse_str_dup(x) switch_xml_parse_str_dynamic(x, SWITCH_TRUE)
|
||||
|
||||
///\brief Given a string of xml data and its length, parses it and creates an switch_xml
|
||||
///\ structure. For efficiency, modifies the data by adding null terminators
|
||||
///\ and decoding ampersand sequences. If you don't want this, copy the data and
|
||||
|
||||
Reference in New Issue
Block a user