data tree FEATURE macro for opaque node value
@@ -765,6 +765,14 @@ struct lyd_node_opaq {
const struct ly_ctx *ctx; /**< libyang context */
};
+/**
+ * @brief Macro for getting the value from an opaque node.
+ *
+ * @param[in] node Opaque node with the value.
+ * @return Node value.
+ */
+#define LYD_OPAQ_VALUE(node) ((struct lyd_node_opaq *)(node))->value
+
/**
* @brief Get the generic parent pointer of a data node.
*
