summaryrefslogtreecommitdiffstats
path: root/swig
diff options
context:
space:
mode:
Diffstat (limited to 'swig')
-rw-r--r--swig/plist.i54
1 files changed, 44 insertions, 10 deletions
diff --git a/swig/plist.i b/swig/plist.i
index 41ff7cc..a56592e 100644
--- a/swig/plist.i
+++ b/swig/plist.i
@@ -180,21 +180,55 @@ typedef struct {
180 } 180 }
181 181
182 PListNode* find_node_by_key(char *s) { 182 PListNode* find_node_by_key(char *s) {
183 PListNode* plist = allocate_wrapper(); 183 plist_t node = plist_find_node_by_key($self->node, s);
184 if (plist) { 184 if (node) {
185 plist->node = plist_find_node_by_key($self->node, s); 185 PListNode* plist = allocate_wrapper();
186 plist->should_keep_plist = 1; 186 if (plist) {
187 plist->node = node;
188 plist->should_keep_plist = 1;
189 }
190 return plist;
187 } 191 }
188 return plist; 192 return NULL;
189 } 193 }
190 194
191 PListNode* find_node_by_string(char* s) { 195 PListNode* find_node_by_string(char* s) {
192 PListNode* plist = allocate_wrapper(); 196 plist_t node = plist_find_node_by_string($self->node, s);
193 if (plist) { 197 if (node) {
194 plist->node = plist_find_node_by_string($self->node, s); 198 PListNode* plist = allocate_wrapper();
195 plist->should_keep_plist = 1; 199 if (plist) {
200 plist->node = node;
201 plist->should_keep_plist = 1;
202 }
203 return plist;
204 }
205 return NULL;
206 }
207
208 PListNode* get_array_nth_el(unsigned int n) {
209 plist_t node = plist_get_array_nth_el($self->node, n);
210 if (node) {
211 PListNode* plist = allocate_wrapper();
212 if (plist) {
213 plist->node = node;
214 plist->should_keep_plist = 1;
215 }
216 return plist;
196 } 217 }
197 return plist; 218 return NULL;
219 }
220
221 PListNode* get_dict_el_from_key(char *key) {
222 plist_t node = plist_get_dict_el_from_key($self->node, key);
223 if (node) {
224 PListNode* plist = allocate_wrapper();
225 if (plist) {
226 plist->node = node;
227 plist->should_keep_plist = 1;
228 }
229 return plist;
230 }
231 return NULL;
198 } 232 }
199 233
200 char* to_xml () { 234 char* to_xml () {