From 3b7d2541f85297561ff5b8873a5bd48bc254f6c8 Mon Sep 17 00:00:00 2001 From: Vincent Jardin Date: Sun, 22 Nov 2026 20:16:50 +0100 Subject: [PATCH] config UPDATE rename _DEPRECATED to LY_DEPRECATED The public header ly_config.h defines _DEPRECATED, a name that applications define as well. Use LY_ prefix. The macro was introduced by dfbe54cad ("tree data UPDATE store raw value with canonical value"). --- src/ly_config.h.in | 4 ++-- src/tree_data.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ly_config.h.in b/src/ly_config.h.in index 487ebf8e6..a9b8b5440 100644 --- a/src/ly_config.h.in +++ b/src/ly_config.h.in @@ -53,10 +53,10 @@ /** printf compiler attribute */ #if defined (__GNUC__) || defined (__llvm__) # define _FORMAT_PRINTF(FORM, ARGS) __attribute__((format (printf, FORM, ARGS))) -# define _DEPRECATED __attribute__((__deprecated__)) +# define LY_DEPRECATED __attribute__((__deprecated__)) #else # define _FORMAT_PRINTF(FORM, ARGS) -# define _DEPRECATED +# define LY_DEPRECATED #endif /** Exporting symbols to a shared library and importing back afterwards diff --git a/src/tree_data.h b/src/tree_data.h index e4f547582..dab70224a 100644 --- a/src/tree_data.h +++ b/src/tree_data.h @@ -1458,7 +1458,7 @@ LIBYANG_API_DECL LY_ERR lyd_new_term_raw_canon(struct lyd_node *parent, const st * @brief Deprecated, use ::lyd_new_term_raw_canon() instead. Produces nodes without canonical values. */ LIBYANG_API_DECL LY_ERR lyd_new_term_raw(struct lyd_node *parent, const struct lys_module *module, const char *name, - const void *value_ptr, uint32_t value_size, uint32_t options, struct lyd_node **node) _DEPRECATED; + const void *value_ptr, uint32_t value_size, uint32_t options, struct lyd_node **node) LY_DEPRECATED; /** * @brief Create a new any node in the data tree.