Commit a9ec8fa5 authored by Nikias Bassen's avatar Nikias Bassen

Removed plist_set_type() as it should not be used.

parent c51d1a77
...@@ -488,14 +488,6 @@ extern "C" ...@@ -488,14 +488,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. * Set the value of a node.
* Forces type of node to #PLIST_KEY * Forces type of node to #PLIST_KEY
......
...@@ -757,36 +757,6 @@ static void plist_set_element_val(plist_t node, plist_type type, const void *val ...@@ -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) void plist_set_key_val(plist_t node, const char *val)
{ {
plist_set_element_val(node, PLIST_KEY, val, strlen(val)); plist_set_element_val(node, PLIST_KEY, val, strlen(val));
......
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