[asterisk-commits] eliel: trunk r260521 - in /trunk: include/asterisk/data.h main/data.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat May 1 21:52:29 CDT 2010


Author: eliel
Date: Sat May  1 21:52:23 2010
New Revision: 260521

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=260521
Log:
Avoid making AstData depend on libxml2 to compile.

We have some functions inside the AstData API to get the tree
in XML form, but it is not required at the moment to compile 
asterisk and we can disable that part of the API if we don't have
libxml2 support.


Modified:
    trunk/include/asterisk/data.h
    trunk/main/data.c

Modified: trunk/include/asterisk/data.h
URL: http://svnview.digium.com/svn/asterisk/trunk/include/asterisk/data.h?view=diff&rev=260521&r1=260520&r2=260521
==============================================================================
--- trunk/include/asterisk/data.h (original)
+++ trunk/include/asterisk/data.h Sat May  1 21:52:23 2010
@@ -500,6 +500,7 @@
  */
 struct ast_data *ast_data_get(const struct ast_data_query *query);
 
+#ifdef HAVE_LIBXML2
 /*!
  * \brief Retrieve a subtree from the asterisk data API in XML format..
  * \param[in] query The query structure specifying what nodes to retrieve.
@@ -509,6 +510,7 @@
  * \see ast_data_free, ast_data_get
  */
 struct ast_xml_doc *ast_data_get_xml(const struct ast_data_query *query);
+#endif
 
 /*!
  * \brief Release the allocated memory of a tree.

Modified: trunk/main/data.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/data.c?view=diff&rev=260521&r1=260520&r2=260521
==============================================================================
--- trunk/main/data.c (original)
+++ trunk/main/data.c Sat May  1 21:52:23 2010
@@ -1845,6 +1845,7 @@
 	return res;
 }
 
+#ifdef HAVE_LIBXML2
 /*!
  * \internal
  * \brief Helper function to move an ast_data tree to xml.
@@ -1944,6 +1945,7 @@
 
 	return doc;
 }
+#endif
 
 enum ast_data_type ast_data_retrieve_type(struct ast_data *node, const char *path)
 {




More information about the asterisk-commits mailing list