From 359043ed0db8ba55284a62b370dc44157a4fe723 Mon Sep 17 00:00:00 2001 From: Philipp Zander Date: Tue, 30 Apr 2024 18:11:01 +0200 Subject: [PATCH 1/2] add missing c api parameter names to documentation --- src/libexpr-c/nix_api_external.h | 4 ++-- src/libstore-c/nix_api_store.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libexpr-c/nix_api_external.h b/src/libexpr-c/nix_api_external.h index 12ea00407..a52346da9 100644 --- a/src/libexpr-c/nix_api_external.h +++ b/src/libexpr-c/nix_api_external.h @@ -136,7 +136,7 @@ typedef struct NixCExternalValueDesc * or setting it to the empty string, will make the conversion throw an error. */ void (*printValueAsJSON)( - void * self, EvalState *, bool strict, nix_string_context * c, bool copyToStore, nix_string_return * res); + void * self, EvalState * state, bool strict, nix_string_context * c, bool copyToStore, nix_string_return * res); /** * @brief Convert the external value to XML * @@ -155,7 +155,7 @@ typedef struct NixCExternalValueDesc */ void (*printValueAsXML)( void * self, - EvalState *, + EvalState * state, int strict, int location, void * doc, diff --git a/src/libstore-c/nix_api_store.h b/src/libstore-c/nix_api_store.h index 209f91f0d..baa53ef09 100644 --- a/src/libstore-c/nix_api_store.h +++ b/src/libstore-c/nix_api_store.h @@ -63,7 +63,7 @@ nix_err nix_init_plugins(nix_c_context * context); * @return a Store pointer, NULL in case of errors * @see nix_store_free */ -Store * nix_store_open(nix_c_context *, const char * uri, const char *** params); +Store * nix_store_open(nix_c_context * context, const char * uri, const char *** params); /** * @brief Deallocate a nix store and free any resources if not also held by other Store instances. From f63292462c5cfd89d718c71a2a345bc0413a3de8 Mon Sep 17 00:00:00 2001 From: Philipp Zander Date: Tue, 30 Apr 2024 18:13:52 +0200 Subject: [PATCH 2/2] document `nix_external_print`'s `printer` parameter to be an out parameter --- src/libexpr-c/nix_api_external.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libexpr-c/nix_api_external.h b/src/libexpr-c/nix_api_external.h index a52346da9..6c524b975 100644 --- a/src/libexpr-c/nix_api_external.h +++ b/src/libexpr-c/nix_api_external.h @@ -48,7 +48,7 @@ void nix_set_string_return(nix_string_return * str, const char * c); * Print to the nix_printer * * @param[out] context Optional, stores error information - * @param printer The nix_printer to print to + * @param[out] printer The nix_printer to print to * @param[in] str The string to print * @returns NIX_OK if everything worked */