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. --- swig/plist.i | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'swig') diff --git a/swig/plist.i b/swig/plist.i index b6f9f78..7240817 100644 --- a/swig/plist.i +++ b/swig/plist.i @@ -141,6 +141,14 @@ typedef struct { return NULL; } + PListNode* get_parent() { + plist_t node = plist_get_parent( $self->node ); + if (node) { + return allocate_wrapper(node, 1); + } + return NULL; + } + %newobject as_key; char* as_key() { char* k = NULL; -- cgit v1.1-32-gdbae