data tree FEATURE always enable data priv pointers
Fixes #1319
Fixes #1320
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2a5b2b3..438913a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -184,7 +184,6 @@
#option(ENABLE_CACHE "Enable data caching for schemas and hash tables for data (time-efficient at the cost of increased space-complexity)" ON)
#option(ENABLE_LATEST_REVISIONS "Enable reusing of latest revisions of schemas" ON)
-#option(ENABLE_LYD_PRIV "Add a private pointer also to struct lyd_node (data node structure), just like in struct lys_node, for arbitrary user data" OFF)
#set(PLUGINS_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libyang" CACHE STRING "Directory with libyang plugins (extensions and user types)")
#if(ENABLE_CACHE)
@@ -193,9 +192,6 @@
#if(ENABLE_LATEST_REVISIONS)
# set(LY_ENABLED_LATEST_REVISIONS 1)
#endif()
-#if(ENABLE_LYD_PRIV)
-# set(LY_ENABLED_LYD_PRIV 1)
-#endif()
if(ENABLE_COVERAGE)
if(NOT ENABLE_BUILD_TESTS)
diff --git a/src/tree_data.h b/src/tree_data.h
index 3dde057..74180bc 100644
--- a/src/tree_data.h
+++ b/src/tree_data.h
@@ -551,10 +551,7 @@
itself. In case of the first node, this pointer points to the last
node in the list. */
struct lyd_meta *meta; /**< pointer to the list of metadata of this node */
-
-#ifdef LY_ENABLED_LYD_PRIV
void *priv; /**< private user data, not used by libyang */
-#endif
};
/**
@@ -574,10 +571,7 @@
itself. In case of the first node, this pointer points to the last
node in the list. */
struct lyd_meta *meta; /**< pointer to the list of metadata of this node */
-
-#ifdef LY_ENABLED_LYD_PRIV
void *priv; /**< private user data, not used by libyang */
-#endif
struct lyd_node *child; /**< pointer to the first child node. */
struct hash_table *children_ht; /**< hash table with all the direct children (except keys for a list, lists without keys) */
@@ -601,10 +595,7 @@
itself. In case of the first node, this pointer points to the last
node in the list. */
struct lyd_meta *meta; /**< pointer to the list of metadata of this node */
-
-#ifdef LY_ENABLED_LYD_PRIV
void *priv; /**< private user data, not used by libyang */
-#endif
struct lyd_value value; /**< node's value representation */
};
@@ -626,10 +617,7 @@
itself. In case of the first node, this pointer points to the last
node in the list. */
struct lyd_meta *meta; /**< pointer to the list of metadata of this node */
-
-#ifdef LY_ENABLED_LYD_PRIV
void *priv; /**< private user data, not used by libyang */
-#endif
union lyd_any_value {
struct lyd_node *tree; /**< data tree */
@@ -709,10 +697,7 @@
struct lyd_node *next; /**< pointer to the next sibling node (NULL if there is no one) */
struct lyd_node *prev; /**< pointer to the previous sibling node (last sibling if there is none) */
struct lyd_attr *attr; /**< pointer to the list of generic attributes of this node */
-
-#ifdef LY_ENABLED_LYD_PRIV
void *priv; /**< private user data, not used by libyang */
-#endif
struct lyd_node *child; /**< pointer to the child node (compatible with ::lyd_node_inner) */