Commit 365acdba authored by Jonathan Beck's avatar Jonathan Beck

Change plist swig allocator name so that it won't collide when included.

parent 1b0bcb34
...@@ -9,7 +9,7 @@ typedef struct { ...@@ -9,7 +9,7 @@ typedef struct {
char should_keep_plist; char should_keep_plist;
} PListNode; } PListNode;
PListNode *allocate_wrapper(plist_t plist, char should_keep_plist) { PListNode *allocate_plist_wrapper(plist_t plist, char should_keep_plist) {
PListNode* wrapper = (PListNode*) malloc(sizeof(PListNode)); PListNode* wrapper = (PListNode*) malloc(sizeof(PListNode));
if (wrapper) { if (wrapper) {
memset(wrapper, 0, sizeof(PListNode)); memset(wrapper, 0, sizeof(PListNode));
...@@ -46,10 +46,10 @@ typedef struct { ...@@ -46,10 +46,10 @@ typedef struct {
PListNode* node = NULL; PListNode* node = NULL;
switch (t) { switch (t) {
case PLIST_ARRAY : case PLIST_ARRAY :
node = allocate_wrapper( plist_new_array(), 0 ); node = allocate_plist_wrapper( plist_new_array(), 0 );
break; break;
case PLIST_DICT : case PLIST_DICT :
node = allocate_wrapper( plist_new_dict(), 0 ); node = allocate_plist_wrapper( plist_new_dict(), 0 );
break; break;
default : default :
node = NULL; node = NULL;
...@@ -69,7 +69,7 @@ typedef struct { ...@@ -69,7 +69,7 @@ typedef struct {
plist_from_xml(data, len, &plist); plist_from_xml(data, len, &plist);
} }
if (plist) if (plist)
return allocate_wrapper( plist, 0 ); return allocate_plist_wrapper( plist, 0 );
} }
return NULL; return NULL;
} }
...@@ -120,7 +120,7 @@ typedef struct { ...@@ -120,7 +120,7 @@ typedef struct {
PListNode* get_first_child() { PListNode* get_first_child() {
plist_t node = plist_get_first_child( $self->node ); plist_t node = plist_get_first_child( $self->node );
if (node) { if (node) {
return allocate_wrapper(node, 1); return allocate_plist_wrapper(node, 1);
} }
return NULL; return NULL;
} }
...@@ -128,7 +128,7 @@ typedef struct { ...@@ -128,7 +128,7 @@ typedef struct {
PListNode* get_next_sibling() { PListNode* get_next_sibling() {
plist_t node = plist_get_next_sibling( $self->node ); plist_t node = plist_get_next_sibling( $self->node );
if (node) { if (node) {
return allocate_wrapper(node, 1); return allocate_plist_wrapper(node, 1);
} }
return NULL; return NULL;
} }
...@@ -136,7 +136,7 @@ typedef struct { ...@@ -136,7 +136,7 @@ typedef struct {
PListNode* get_prev_sibling() { PListNode* get_prev_sibling() {
plist_t node = plist_get_prev_sibling( $self->node ); plist_t node = plist_get_prev_sibling( $self->node );
if (node) { if (node) {
return allocate_wrapper(node, 1); return allocate_plist_wrapper(node, 1);
} }
return NULL; return NULL;
} }
...@@ -144,7 +144,7 @@ typedef struct { ...@@ -144,7 +144,7 @@ typedef struct {
PListNode* get_parent() { PListNode* get_parent() {
plist_t node = plist_get_parent( $self->node ); plist_t node = plist_get_parent( $self->node );
if (node) { if (node) {
return allocate_wrapper(node, 1); return allocate_plist_wrapper(node, 1);
} }
return NULL; return NULL;
} }
...@@ -198,7 +198,7 @@ typedef struct { ...@@ -198,7 +198,7 @@ typedef struct {
PListNode* find_node_by_key(char *s) { PListNode* find_node_by_key(char *s) {
plist_t node = plist_find_node_by_key($self->node, s); plist_t node = plist_find_node_by_key($self->node, s);
if (node) { if (node) {
return allocate_wrapper(node, 1); return allocate_plist_wrapper(node, 1);
} }
return NULL; return NULL;
} }
...@@ -206,7 +206,7 @@ typedef struct { ...@@ -206,7 +206,7 @@ typedef struct {
PListNode* find_node_by_string(char* s) { PListNode* find_node_by_string(char* s) {
plist_t node = plist_find_node_by_string($self->node, s); plist_t node = plist_find_node_by_string($self->node, s);
if (node) { if (node) {
return allocate_wrapper(node, 1); return allocate_plist_wrapper(node, 1);
} }
return NULL; return NULL;
} }
...@@ -214,7 +214,7 @@ typedef struct { ...@@ -214,7 +214,7 @@ typedef struct {
PListNode* get_array_nth_el(unsigned int n) { PListNode* get_array_nth_el(unsigned int n) {
plist_t node = plist_get_array_nth_el($self->node, n); plist_t node = plist_get_array_nth_el($self->node, n);
if (node) { if (node) {
return allocate_wrapper(node, 1); return allocate_plist_wrapper(node, 1);
} }
return NULL; return NULL;
} }
...@@ -222,7 +222,7 @@ typedef struct { ...@@ -222,7 +222,7 @@ typedef struct {
PListNode* get_dict_el_from_key(char *key) { PListNode* get_dict_el_from_key(char *key) {
plist_t node = plist_get_dict_el_from_key($self->node, key); plist_t node = plist_get_dict_el_from_key($self->node, key);
if (node) { if (node) {
return allocate_wrapper(node, 1); return allocate_plist_wrapper(node, 1);
} }
return NULL; return NULL;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment