diff options
| author | 2009-07-18 12:14:35 +0200 | |
|---|---|---|
| committer | 2009-07-18 12:14:35 +0200 | |
| commit | 365acdbafd2ff8ffc0a302c7c897f06596d6a1aa (patch) | |
| tree | d19e214f6d937c1517857b72973c1e51e97f8f9f /swig/plist.i | |
| parent | 1b0bcb3434d25d425862a2e06d63277c0ad3a9f1 (diff) | |
| download | libplist-365acdbafd2ff8ffc0a302c7c897f06596d6a1aa.tar.gz libplist-365acdbafd2ff8ffc0a302c7c897f06596d6a1aa.tar.bz2 | |
Change plist swig allocator name so that it won't collide when included.
Diffstat (limited to 'swig/plist.i')
| -rw-r--r-- | swig/plist.i | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/swig/plist.i b/swig/plist.i index 7240817..c492c1e 100644 --- a/swig/plist.i +++ b/swig/plist.i | |||
| @@ -9,7 +9,7 @@ typedef struct { | |||
| 9 | char should_keep_plist; | 9 | char should_keep_plist; |
| 10 | } PListNode; | 10 | } PListNode; |
| 11 | 11 | ||
| 12 | PListNode *allocate_wrapper(plist_t plist, char should_keep_plist) { | 12 | PListNode *allocate_plist_wrapper(plist_t plist, char should_keep_plist) { |
| 13 | PListNode* wrapper = (PListNode*) malloc(sizeof(PListNode)); | 13 | PListNode* wrapper = (PListNode*) malloc(sizeof(PListNode)); |
| 14 | if (wrapper) { | 14 | if (wrapper) { |
| 15 | memset(wrapper, 0, sizeof(PListNode)); | 15 | memset(wrapper, 0, sizeof(PListNode)); |
| @@ -46,10 +46,10 @@ typedef struct { | |||
| 46 | PListNode* node = NULL; | 46 | PListNode* node = NULL; |
| 47 | switch (t) { | 47 | switch (t) { |
| 48 | case PLIST_ARRAY : | 48 | case PLIST_ARRAY : |
| 49 | node = allocate_wrapper( plist_new_array(), 0 ); | 49 | node = allocate_plist_wrapper( plist_new_array(), 0 ); |
| 50 | break; | 50 | break; |
| 51 | case PLIST_DICT : | 51 | case PLIST_DICT : |
| 52 | node = allocate_wrapper( plist_new_dict(), 0 ); | 52 | node = allocate_plist_wrapper( plist_new_dict(), 0 ); |
| 53 | break; | 53 | break; |
| 54 | default : | 54 | default : |
| 55 | node = NULL; | 55 | node = NULL; |
| @@ -69,7 +69,7 @@ typedef struct { | |||
| 69 | plist_from_xml(data, len, &plist); | 69 | plist_from_xml(data, len, &plist); |
| 70 | } | 70 | } |
| 71 | if (plist) | 71 | if (plist) |
| 72 | return allocate_wrapper( plist, 0 ); | 72 | return allocate_plist_wrapper( plist, 0 ); |
| 73 | } | 73 | } |
| 74 | return NULL; | 74 | return NULL; |
| 75 | } | 75 | } |
| @@ -120,7 +120,7 @@ typedef struct { | |||
| 120 | PListNode* get_first_child() { | 120 | PListNode* get_first_child() { |
| 121 | plist_t node = plist_get_first_child( $self->node ); | 121 | plist_t node = plist_get_first_child( $self->node ); |
| 122 | if (node) { | 122 | if (node) { |
| 123 | return allocate_wrapper(node, 1); | 123 | return allocate_plist_wrapper(node, 1); |
| 124 | } | 124 | } |
| 125 | return NULL; | 125 | return NULL; |
| 126 | } | 126 | } |
| @@ -128,7 +128,7 @@ typedef struct { | |||
| 128 | PListNode* get_next_sibling() { | 128 | PListNode* get_next_sibling() { |
| 129 | plist_t node = plist_get_next_sibling( $self->node ); | 129 | plist_t node = plist_get_next_sibling( $self->node ); |
| 130 | if (node) { | 130 | if (node) { |
| 131 | return allocate_wrapper(node, 1); | 131 | return allocate_plist_wrapper(node, 1); |
| 132 | } | 132 | } |
| 133 | return NULL; | 133 | return NULL; |
| 134 | } | 134 | } |
| @@ -136,7 +136,7 @@ typedef struct { | |||
| 136 | PListNode* get_prev_sibling() { | 136 | PListNode* get_prev_sibling() { |
| 137 | plist_t node = plist_get_prev_sibling( $self->node ); | 137 | plist_t node = plist_get_prev_sibling( $self->node ); |
| 138 | if (node) { | 138 | if (node) { |
| 139 | return allocate_wrapper(node, 1); | 139 | return allocate_plist_wrapper(node, 1); |
| 140 | } | 140 | } |
| 141 | return NULL; | 141 | return NULL; |
| 142 | } | 142 | } |
| @@ -144,7 +144,7 @@ typedef struct { | |||
| 144 | PListNode* get_parent() { | 144 | PListNode* get_parent() { |
| 145 | plist_t node = plist_get_parent( $self->node ); | 145 | plist_t node = plist_get_parent( $self->node ); |
| 146 | if (node) { | 146 | if (node) { |
| 147 | return allocate_wrapper(node, 1); | 147 | return allocate_plist_wrapper(node, 1); |
| 148 | } | 148 | } |
| 149 | return NULL; | 149 | return NULL; |
| 150 | } | 150 | } |
| @@ -198,7 +198,7 @@ typedef struct { | |||
| 198 | PListNode* find_node_by_key(char *s) { | 198 | PListNode* find_node_by_key(char *s) { |
| 199 | plist_t node = plist_find_node_by_key($self->node, s); | 199 | plist_t node = plist_find_node_by_key($self->node, s); |
| 200 | if (node) { | 200 | if (node) { |
| 201 | return allocate_wrapper(node, 1); | 201 | return allocate_plist_wrapper(node, 1); |
| 202 | } | 202 | } |
| 203 | return NULL; | 203 | return NULL; |
| 204 | } | 204 | } |
| @@ -206,7 +206,7 @@ typedef struct { | |||
| 206 | PListNode* find_node_by_string(char* s) { | 206 | PListNode* find_node_by_string(char* s) { |
| 207 | plist_t node = plist_find_node_by_string($self->node, s); | 207 | plist_t node = plist_find_node_by_string($self->node, s); |
| 208 | if (node) { | 208 | if (node) { |
| 209 | return allocate_wrapper(node, 1); | 209 | return allocate_plist_wrapper(node, 1); |
| 210 | } | 210 | } |
| 211 | return NULL; | 211 | return NULL; |
| 212 | } | 212 | } |
| @@ -214,7 +214,7 @@ typedef struct { | |||
| 214 | PListNode* get_array_nth_el(unsigned int n) { | 214 | PListNode* get_array_nth_el(unsigned int n) { |
| 215 | plist_t node = plist_get_array_nth_el($self->node, n); | 215 | plist_t node = plist_get_array_nth_el($self->node, n); |
| 216 | if (node) { | 216 | if (node) { |
| 217 | return allocate_wrapper(node, 1); | 217 | return allocate_plist_wrapper(node, 1); |
| 218 | } | 218 | } |
| 219 | return NULL; | 219 | return NULL; |
| 220 | } | 220 | } |
| @@ -222,7 +222,7 @@ typedef struct { | |||
| 222 | PListNode* get_dict_el_from_key(char *key) { | 222 | PListNode* get_dict_el_from_key(char *key) { |
| 223 | plist_t node = plist_get_dict_el_from_key($self->node, key); | 223 | plist_t node = plist_get_dict_el_from_key($self->node, key); |
| 224 | if (node) { | 224 | if (node) { |
| 225 | return allocate_wrapper(node, 1); | 225 | return allocate_plist_wrapper(node, 1); |
| 226 | } | 226 | } |
| 227 | return NULL; | 227 | return NULL; |
| 228 | } | 228 | } |
