1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-30 07:33:16 +02:00

C API: Use nix_get_string_callback typedef

This commit is contained in:
José Luis Lafuente 2024-04-15 12:05:57 +02:00
parent 76444a3958
commit 774e7213e8
No known key found for this signature in database
GPG key ID: 8A3455EBE455489A
6 changed files with 19 additions and 62 deletions

View file

@ -76,11 +76,7 @@ void nix_store_free(Store * store);
* @see nix_get_string_callback
* @return error code, NIX_OK on success.
*/
nix_err nix_store_get_uri(
nix_c_context * context,
Store * store,
void (*callback)(const char * start, unsigned int n, void * user_data),
void * user_data);
nix_err nix_store_get_uri(nix_c_context * context, Store * store, nix_get_string_callback callback, void * user_data);
// returns: owned StorePath*
/**
@ -101,10 +97,7 @@ StorePath * nix_store_parse_path(nix_c_context * context, Store * store, const c
* @param[in] callback called with the name
* @param[in] user_data arbitrary data, passed to the callback when it's called.
*/
void nix_store_path_name(
const StorePath * store_path,
void (*callback)(const char * start, unsigned int n, void * user_data),
void * user_data);
void nix_store_path_name(const StorePath * store_path, nix_get_string_callback callback, void * user_data);
/**
* @brief Copy a StorePath
@ -163,11 +156,8 @@ nix_err nix_store_realise(
* @see nix_get_string_callback
* @return error code, NIX_OK on success.
*/
nix_err nix_store_get_version(
nix_c_context * context,
Store * store,
void (*callback)(const char * start, unsigned int n, void * user_data),
void * user_data);
nix_err
nix_store_get_version(nix_c_context * context, Store * store, nix_get_string_callback callback, void * user_data);
// cffi end
#ifdef __cplusplus