* using parent_name as parent node.
* with_hash=TRUE to indicate that the created node will have a parent
*/
-extern guint8* manip_stat_node(manip_node_mode mode, stats_tree* st, const guint8* name, int parent_id, gboolean with_hash, gint value) {
+extern int manip_stat_node(manip_node_mode mode, stats_tree* st, const guint8* name, int parent_id, gboolean with_hash, gint value) {
stat_node* node = NULL;
stat_node* parent = NULL;
}
if (node)
- return node->name;
+ return node->id;
else
- return NULL;
+ return -1;
}
* with_children=TRUE to indicate that the created node will be a parent
*/
typedef enum _manip_node_mode { MN_INCREASE, MN_SET } manip_node_mode;
-extern guint8* manip_stat_node(manip_node_mode mode,
+extern int manip_stat_node(manip_node_mode mode,
stats_tree* st,
const guint8* name,
int parent_id,