diff options
author | Jonathan Beck | 2009-01-29 19:03:48 +0100 |
---|---|---|
committer | Jonathan Beck | 2009-01-29 19:03:48 +0100 |
commit | 23b1e3200833dd79d754e7057ad1a4154f15172e (patch) | |
tree | 332e6cad826272cc8684ff42a58f6ee6f6a6dcc0 | |
parent | ddf3e321b10cfabf63e16e7061952465c3055664 (diff) | |
download | libplist-23b1e3200833dd79d754e7057ad1a4154f15172e.tar.gz libplist-23b1e3200833dd79d754e7057ad1a4154f15172e.tar.bz2 |
Remove duplicate uint64_t accessor.
-rw-r--r-- | src/bplist.c | 10 | ||||
-rw-r--r-- | src/plist.c | 8 | ||||
-rw-r--r-- | src/plist.h | 1 |
3 files changed, 5 insertions, 14 deletions
diff --git a/src/bplist.c b/src/bplist.c index 67d7f72..0140f88 100644 --- a/src/bplist.c +++ b/src/bplist.c @@ -268,7 +268,7 @@ static plist_t parse_bin_node(char *object, uint8_t dict_size, char **next_objec plist_t size_node = parse_bin_node(object, dict_size, &object); if (plist_get_node_type(size_node) != PLIST_UINT) return NULL; - size = plist_get_node_uint_val(size_node); + plist_get_uint_val(size_node, &size); } return parse_data_node(object, size); @@ -277,7 +277,7 @@ static plist_t parse_bin_node(char *object, uint8_t dict_size, char **next_objec plist_t size_node = parse_bin_node(object, dict_size, &object); if (plist_get_node_type(size_node) != PLIST_UINT) return NULL; - size = plist_get_node_uint_val(size_node); + plist_get_uint_val(size_node, &size); } return parse_string_node(object, size); @@ -286,7 +286,7 @@ static plist_t parse_bin_node(char *object, uint8_t dict_size, char **next_objec plist_t size_node = parse_bin_node(object, dict_size, &object); if (plist_get_node_type(size_node) != PLIST_UINT) return NULL; - size = plist_get_node_uint_val(size_node); + plist_get_uint_val(size_node, &size); } return parse_unicode_node(object, size); @@ -296,7 +296,7 @@ static plist_t parse_bin_node(char *object, uint8_t dict_size, char **next_objec plist_t size_node = parse_bin_node(object, dict_size, &object); if (plist_get_node_type(size_node) != PLIST_UINT) return NULL; - size = plist_get_node_uint_val(size_node); + plist_get_uint_val(size_node, &size); } return parse_array_node(object, size, dict_size); @@ -306,7 +306,7 @@ static plist_t parse_bin_node(char *object, uint8_t dict_size, char **next_objec plist_t size_node = parse_bin_node(object, dict_size, &object); if (plist_get_node_type(size_node) != PLIST_UINT) return NULL; - size = plist_get_node_uint_val(size_node); + plist_get_uint_val(size_node, &size); } return parse_dict_node(object, size, dict_size); default: diff --git a/src/plist.c b/src/plist.c index 709f12d..5fc2338 100644 --- a/src/plist.c +++ b/src/plist.c @@ -251,14 +251,6 @@ plist_type plist_get_node_type(plist_t node) return PLIST_NONE; } -uint64_t plist_get_node_uint_val(plist_t node) -{ - if (PLIST_UINT == plist_get_node_type(node)) - return plist_get_data(node)->intval; - else - return 0; -} - void plist_add_sub_node(plist_t node, plist_t subnode) { if (node && subnode) { diff --git a/src/plist.h b/src/plist.h index 319647d..7596992 100644 --- a/src/plist.h +++ b/src/plist.h @@ -55,7 +55,6 @@ plist_t plist_new_node(plist_data_t data); plist_data_t plist_get_data(const plist_t node); plist_data_t plist_new_plist_data(); void plist_free_plist_data(plist_data_t node); -uint64_t plist_get_node_uint_val(plist_t node); plist_t plist_add_sub_element( plist_t node, plist_type type, const void* value, uint64_t length); plist_t plist_find_node(plist_t plist, plist_type type, const void *value, uint64_t length); |