printer CHANGE allow passing argument to the caller's provided printer callback
diff --git a/src/libyang.h b/src/libyang.h
index 00aef85..0e34c4c 100644
--- a/src/libyang.h
+++ b/src/libyang.h
@@ -498,12 +498,13 @@
*
* @param[in] module Schema tree to print.
* @param[in] writeclb Callback function to write the data (see write(1)).
+ * @param[in] arg Optional caller-specific argument to be passed to the \p writeclb callback.
* @param[in] format Schema output format.
* @param[in] target_node Optional parameter for ::LYS_OUT_INFO format. It specifies which particular
* node in the module will be printed.
* @return 0 on success, 1 on failure (#ly_errno is set).
*/
-int lys_print_clb(ssize_t (*writeclb)(const void *buf, size_t count), struct lys_module *module, LYS_OUTFORMAT format, const char *target_node);
+int lys_print_clb(ssize_t (*writeclb)(void *arg, const void *buf, size_t count), void *arg, struct lys_module *module, LYS_OUTFORMAT format, const char *target_node);
/**
* @brief Print data tree in the specified format.
@@ -539,10 +540,11 @@
* @param[in] root Root node of the data tree to print. It can be actually any (not only real root)
* node of the data tree to print the specific subtree.
* @param[in] writeclb Callback function to write the data (see write(1)).
+ * @param[in] arg Optional caller-specific argument to be passed to the \p writeclb callback.
* @param[in] format Data output format.
* @return 0 on success, 1 on failure (#ly_errno is set).
*/
-int lyd_print_clb(ssize_t (*writeclb)(const void *buf, size_t count), struct lyd_node *root, LYD_FORMAT format);
+int lyd_print_clb(ssize_t (*writeclb)(void *arg, const void *buf, size_t count), void *arg, struct lyd_node *root, LYD_FORMAT format);
/**@} printers */