Skip to content

Commit

Permalink
nix_api_value: nix_{get,set}_double -> nix_{get,set}_float
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickvP committed Jul 27, 2023
1 parent 47c92a8 commit 96d468b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/libexpr/nix_api_value.cc
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ unsigned int nix_get_attrs_size(nix_c_context *context, const Value *value) {
NIXC_CATCH_ERRS_RES(0);
}

double nix_get_double(nix_c_context *context, const Value *value) {
double nix_get_float(nix_c_context *context, const Value *value) {
if (context)
context->last_err_code = NIX_OK;
try {
Expand Down Expand Up @@ -299,7 +299,7 @@ nix_err nix_set_path_string(nix_c_context *context, Value *value,
NIXC_CATCH_ERRS
}

nix_err nix_set_double(nix_c_context *context, Value *value, double d) {
nix_err nix_set_float(nix_c_context *context, Value *value, double d) {
if (context)
context->last_err_code = NIX_OK;
try {
Expand Down
8 changes: 4 additions & 4 deletions src/libexpr/nix_api_value.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ unsigned int nix_get_attrs_size(nix_c_context *context, const Value *value);
* @param[in] value Nix value to inspect
* @return float contents, error info via context
*/
double nix_get_double(nix_c_context *context, const Value *value);
double nix_get_float(nix_c_context *context, const Value *value);
/** @brief Get int value
* @param[out] context Optional, stores error information
* @param[in] value Nix value to inspect
Expand Down Expand Up @@ -236,13 +236,13 @@ nix_err nix_set_string(nix_c_context *context, Value *value, const char *str);
*/
nix_err nix_set_path_string(nix_c_context *context, Value *value,
const char *str);
/** @brief Set a double
/** @brief Set a float
* @param[out] context Optional, stores error information
* @param[out] value Nix value to modify
* @param[in] d the double
* @param[in] d the float, 64-bits
* @return error code, NIX_OK on success.
*/
nix_err nix_set_double(nix_c_context *context, Value *value, double d);
nix_err nix_set_float(nix_c_context *context, Value *value, double d);
/** @brief Set an int
* @param[out] context Optional, stores error information
* @param[out] value Nix value to modify
Expand Down

0 comments on commit 96d468b

Please sign in to comment.