Commit 07fe3de
committed
fix(libexpr-c): nix_get_external should use check_value_in, not check_value_out
nix_get_external reads from an already-initialized nix_value (set via
nix_init_external). Every other getter in the file (nix_get_bool,
nix_get_int, nix_get_float, nix_get_string, nix_get_path_string) uses
check_value_in, which asserts the value IS initialized. nix_get_external
was the sole getter using check_value_out, which asserts the value is
UNinitialized and throws "nix_value already initialized" for any valid
external value — making the function always fail.
Also made the value parameter const to match all other getters.1 parent b4f9970 commit 07fe3de
2 files changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
| 333 | + | |
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
338 | | - | |
| 338 | + | |
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
354 | | - | |
| 354 | + | |
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
| |||
0 commit comments