tree data OPTIMIZE duplication of a hash table
Allocate the exact amount of memory for a new hash table as was
allocated for the old one at once.
diff --git a/src/tree_data_internal.h b/src/tree_data_internal.h
index 2bfa66d..b3a027c 100644
--- a/src/tree_data_internal.h
+++ b/src/tree_data_internal.h
@@ -16,6 +16,7 @@
#ifndef LY_TREE_DATA_INTERNAL_H_
#define LY_TREE_DATA_INTERNAL_H_
+#include "compat.h"
#include "log.h"
#include "plugins_types.h"
#include "tree_data.h"
@@ -601,6 +602,13 @@
LY_ERR lyd_hash(struct lyd_node *node);
/**
+ * @brief Compare callback for values in hash table.
+ *
+ * Implementation of ::lyht_value_equal_cb.
+ */
+ly_bool lyd_hash_table_val_equal(void *val1_p, void *val2_p, ly_bool mod, void *cb_data);
+
+/**
* @brief Insert hash of the node into the hash table of its parent.
*
* @param[in] node Data node which hash will be inserted into the ::lyd_node_inner.children_ht hash table of its parent.