plugins CHANGE define supporting macro for external plugins
Define single (one for type plugins and another for extension
plugins) macro to use in external plugins implementation declaring all
the expected variables for successful loading of the dynamic plugin.
diff --git a/src/plugins_exts.h b/src/plugins_exts.h
index 6ebe123..abce9e0 100644
--- a/src/plugins_exts.h
+++ b/src/plugins_exts.h
@@ -41,13 +41,17 @@
/**
* @brief Extensions API version
*/
-#define LYEXT_API_VERSION 1
+#define LYPLG_EXT_API_VERSION 1
/**
- * @brief Macro to store version of extension plugins API in the plugins.
- * It is matched when the plugin is being loaded by libyang.
+ * @brief Macro to define plugin information in external plugins
+ *
+ * Use as follows:
+ * LYPLG_EXTENSIONS = {{<filled information of ::lyplg_ext_record>}, ..., {0}};
*/
-#define LYEXT_VERSION_CHECK uint32_t lyext_api_version = LYEXT_API_VERSION;
+#define LYPLG_EXTENSIONS \
+ uint32_t plugins_extensions_apiver__ = LYPLG_EXT_API_VERSION; \
+ const struct lyplg_ext_record plugins_extensions__[]
/**
* @brief Possible cardinalities of the YANG statements.