mirror of
https://github.com/NixOS/nix
synced 2025-06-26 03:21:16 +02:00
C API: Require initialized value from primop definition
This commit is contained in:
parent
a942a34469
commit
8884227045
2 changed files with 37 additions and 0 deletions
|
@ -94,6 +94,12 @@ static void nix_c_primop_wrapper(
|
|||
state.error<nix::EvalError>("Error from builtin function: %s", *ctx.last_err).atPos(pos).debugThrow();
|
||||
}
|
||||
|
||||
if (!vTmp.isValid()) {
|
||||
state.error<nix::EvalError>("Implementation error in custom function: return value was not initialized")
|
||||
.atPos(pos)
|
||||
.debugThrow();
|
||||
}
|
||||
|
||||
v = vTmp;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue