From 07c1d3c90512f5fa057e7eff7d307cffe6258111 Mon Sep 17 00:00:00 2001 From: Jonathan Beck Date: Sat, 18 Jul 2009 12:08:13 +0200 Subject: Add function to get parent node in API and python bindings. --- src/plist.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/plist.c b/src/plist.c index 8c326af..143418d 100644 --- a/src/plist.c +++ b/src/plist.c @@ -195,6 +195,11 @@ plist_t plist_get_prev_sibling(plist_t node) return (plist_t) g_node_prev_sibling((GNode *) node); } +plist_t plist_get_parent(plist_t node) +{ + return node ? (plist_t) ((GNode *) node)->parent : NULL; +} + plist_t plist_get_array_nth_el(plist_t node, uint32_t n) { plist_t ret = NULL; -- cgit v1.1-32-gdbae