summaryrefslogtreecommitdiffstats
path: root/src/xplist.c
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2008-12-13 13:56:55 +0100
committerGravatar Jonathan Beck2008-12-13 13:56:55 +0100
commite220e2cf08809a6a8853a8c9c7b06cef4e90cb57 (patch)
tree51472b19b56c5816fc050fcac6273a5931f9f4f6 /src/xplist.c
parent3fdd24aea06a9bf38d9d34fb8bccbb7023ed3100 (diff)
downloadlibplist-e220e2cf08809a6a8853a8c9c7b06cef4e90cb57.tar.gz
libplist-e220e2cf08809a6a8853a8c9c7b06cef4e90cb57.tar.bz2
Add plutil and do some cleaning.
Diffstat (limited to 'src/xplist.c')
-rw-r--r--src/xplist.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/xplist.c b/src/xplist.c
index 2d650b4..4f81e1b 100644
--- a/src/xplist.c
+++ b/src/xplist.c
@@ -120,7 +120,7 @@ void node_to_xml(GNode * node, gpointer xml_struct)
return;
struct xml_node *xstruct = (struct xml_node *) xml_struct;
- struct plist_data *node_data = (struct plist_data *) node->data;
+ plist_data_t node_data = plist_get_data(node);
xmlNodePtr child_node = NULL;
char isStruct = FALSE;
@@ -220,7 +220,7 @@ void xml_to_node(xmlNodePtr xml_node, plist_t * plist_node)
if (!node)
break;
- struct plist_data *data = (struct plist_data *) calloc(sizeof(struct plist_data), 1);
+ plist_data_t data = plist_new_plist_data();
GNode *subnode = g_node_new(data);
if (*plist_node)
g_node_append(*plist_node, subnode);
@@ -303,7 +303,7 @@ void plist_to_xml(plist_t plist, char **plist_xml, uint32_t * length)
xmlDocDumpMemory(plist_doc, (xmlChar **) plist_xml, length);
}
-void xml_to_plist(const char *plist_xml, uint32_t length, plist_t * plist)
+void plist_from_xml(const char *plist_xml, uint32_t length, plist_t * plist)
{
xmlDocPtr plist_doc = xmlReadMemory(plist_xml, length, NULL, NULL, 0);
xmlNodePtr root_node = xmlDocGetRootElement(plist_doc);