1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-19 23:03:53 -04:00
Commit graph

20 commits

Author SHA1 Message Date
Robert Hensing b94e1d6218 C API: Value -> nix_value
See issue https://github.com/NixOS/nix/issues/10434
2024-06-13 18:51:58 +02:00
Robert Hensing 0b56c98b1c C API: Value -> nix_value 2024-06-13 18:18:36 +02:00
Robert Hensing 4bc4fb40ea C API: builtin -> custom function
Not all primops will be in `builtins`.
2024-05-23 21:23:14 +02:00
Robert Hensing 8ef6efc184 C API: Require non-thunk value from primop definition 2024-05-23 21:22:59 +02:00
Robert Hensing 8884227045 C API: Require initialized value from primop definition 2024-05-23 21:22:21 +02:00
Robert Hensing a942a34469 C API: Fix nix_c_primop_wrapper for strict initializers
https://github.com/NixOS/nix/pull/10555 added a check requiring
that output parameters always have an uninitialized Value as argument.

Unfortunately the output parameter of the primop callback received
a thunk instead.

See the comment for implementation considerations.
2024-05-23 18:32:49 +02:00
José Luis Lafuente 6acf02b32a
C API: source argument to nix_copy_value should be const 2024-04-21 22:46:18 +02:00
José Luis Lafuente 8d70db3251
C API: add check_value_[in,out] helper functions 2024-04-21 22:44:14 +02:00
José Luis Lafuente ccad6e94e2
C API: add (un)initialized value checks 2024-04-21 22:44:14 +02:00
Robert Hensing ad643cde58 C API: Add nix_init_apply
Thunks are relevant when initializing attrsets and lists, passing
arguments. This is an important way to produce them.
2024-04-18 19:13:38 +02:00
Eelco Dolstra 6a3ecdaa39 Merge remote-tracking branch 'origin/master' into finish-value 2024-04-17 16:02:44 +02:00
José Luis Lafuente c75b143b6c
C API: nix_get_string now accepts a callback to return the value 2024-04-16 22:36:39 +02:00
José Luis Lafuente 76444a3958
C API: proper ifdef endif indentation 2024-04-14 16:18:32 +02:00
José Luis Lafuente 01bad63c72
C API: Safer function pointer casting
See https://github.com/NixOS/nix/pull/8699#discussion_r1554312181

Casting a function pointer to `void*` is undefined behavior in the C
spec, since there are platforms with different sizes for these two kinds
of pointers. A safe alternative might be `void (*callback)()`
2024-04-12 21:41:15 +02:00
Robert Hensing 02c41aba5b libexpr-c: Add nix_string_realise 2024-04-05 16:08:18 +02:00
John Ericson c1e0769355 Fix some portability issues with the new C bindings
Build without GC is unbroken

Fix #10403

Also building tests with Windows (assuming rest of Windows fixes) is
unbroken.
2024-04-05 00:54:47 -04:00
José Luis Lafuente 926fbadcc3
C API: add more tests 2024-03-29 14:00:19 +01:00
José Luis Lafuente 061140fc8f
C API: remove unused argument 2024-03-28 19:38:12 +01:00
José Luis Lafuente 925a8fda6e
C API: Use new ListBuilder helper
See https://github.com/NixOS/nix/pull/10251
2024-03-28 19:02:01 +01:00
José Luis Lafuente c57de60522
C API: Keep the structure flat
See https://github.com/NixOS/nix/pull/10329
2024-03-28 19:00:04 +01:00
Renamed from src/libexpr/c/nix_api_value.cc (Browse further)