1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 20:01:15 +02:00

nix_api_value: nix_{get,set}_double -> nix_{get,set}_float

This commit is contained in:
Yorick van Pelt 2023-07-27 13:14:40 +02:00 committed by José Luis Lafuente
parent efcddcdd2f
commit 1e583c4ebd
No known key found for this signature in database
GPG key ID: 8A3455EBE455489A
2 changed files with 6 additions and 6 deletions

View file

@ -170,7 +170,7 @@ unsigned int nix_get_attrs_size(nix_c_context *context, const Value *value) {
NIXC_CATCH_ERRS_RES(0); 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) if (context)
context->last_err_code = NIX_OK; context->last_err_code = NIX_OK;
try { try {
@ -299,7 +299,7 @@ nix_err nix_set_path_string(nix_c_context *context, Value *value,
NIXC_CATCH_ERRS 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) if (context)
context->last_err_code = NIX_OK; context->last_err_code = NIX_OK;
try { try {

View file

@ -151,7 +151,7 @@ unsigned int nix_get_attrs_size(nix_c_context *context, const Value *value);
* @param[in] value Nix value to inspect * @param[in] value Nix value to inspect
* @return float contents, error info via context * @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 /** @brief Get int value
* @param[out] context Optional, stores error information * @param[out] context Optional, stores error information
* @param[in] value Nix value to inspect * @param[in] value Nix value to inspect
@ -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, nix_err nix_set_path_string(nix_c_context *context, Value *value,
const char *str); const char *str);
/** @brief Set a double /** @brief Set a float
* @param[out] context Optional, stores error information * @param[out] context Optional, stores error information
* @param[out] value Nix value to modify * @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. * @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 /** @brief Set an int
* @param[out] context Optional, stores error information * @param[out] context Optional, stores error information
* @param[out] value Nix value to modify * @param[out] value Nix value to modify