Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C API: Fix custom primops #10767

Merged

Conversation

roberth
Copy link
Member

@roberth roberth commented May 23, 2024

Motivation

  • Fix a bug introduced in Add isValid to nix::Value #10555
  • Add tests for calls of arity 0, 1, 2.
  • Make calling curried functions from C more convenient, which helps with testing.

Context

Priorities and Process

Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

NixOS#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.
@roberth roberth added bug c api Nix as a C library with a stable interface labels May 23, 2024
@roberth roberth requested a review from edolstra as a code owner May 23, 2024 18:27
@roberth roberth force-pushed the fix-c-api-primop-for-strict-initializers branch from ff4bb5f to 97c3463 Compare May 23, 2024 19:26
@roberth roberth added this to the Stable C API milestone May 23, 2024
@roberth roberth merged commit c90a763 into NixOS:master May 24, 2024
9 checks passed
@roberth
Copy link
Member Author

roberth commented May 24, 2024

Thanks for the quick review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug c api Nix as a C library with a stable interface
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants