summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2014-05-20 21:01:11 +0200
committerGravatar Nikias Bassen2014-05-20 21:01:11 +0200
commita9ec8fa5ceaa082e36150814f0b9b4d123b00f26 (patch)
treefc7454e702066b632f0b96b9a49ce2dcb2db22ad
parentc51d1a77b04872020234af49384a4ebd22ddd5f0 (diff)
downloadlibplist-a9ec8fa5ceaa082e36150814f0b9b4d123b00f26.tar.gz
libplist-a9ec8fa5ceaa082e36150814f0b9b4d123b00f26.tar.bz2
Removed plist_set_type() as it should not be used.
-rw-r--r--include/plist/plist.h8
-rw-r--r--src/plist.c30
2 files changed, 0 insertions, 38 deletions
diff --git a/include/plist/plist.h b/include/plist/plist.h
index f7df832..5678cfb 100644
--- a/include/plist/plist.h
+++ b/include/plist/plist.h
@@ -489,14 +489,6 @@ extern "C"
********************************************/
/**
- * Forces type of node. Changing type of structured nodes is only allowed if node is empty.
- * Reset value of node;
- * @param node the node
- * @param type the key value
- */
- PLIST_API void plist_set_type(plist_t node, plist_type type);
-
- /**
* Set the value of a node.
* Forces type of node to #PLIST_KEY
*
diff --git a/src/plist.c b/src/plist.c
index 137188e..317a758 100644
--- a/src/plist.c
+++ b/src/plist.c
@@ -757,36 +757,6 @@ static void plist_set_element_val(plist_t node, plist_type type, const void *val
}
}
-void plist_set_type(plist_t node, plist_type type)
-{
- if ( node_n_children(node) == 0 )
- {
- plist_data_t data = plist_get_data(node);
- plist_free_data( data );
- data = plist_new_plist_data();
- data->type = type;
- switch (type)
- {
- case PLIST_BOOLEAN:
- data->length = sizeof(uint8_t);
- break;
- case PLIST_UINT:
- case PLIST_UID:
- data->length = sizeof(uint64_t);
- break;
- case PLIST_REAL:
- data->length = sizeof(double);
- break;
- case PLIST_DATE:
- data->length = sizeof(struct timeval);
- break;
- default:
- data->length = 0;
- break;
- }
- }
-}
-
void plist_set_key_val(plist_t node, const char *val)
{
plist_set_element_val(node, PLIST_KEY, val, strlen(val));