1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

C API: add tests for external values

This commit is contained in:
José Luis Lafuente 2024-02-25 00:28:04 +01:00 committed by José Luis Lafuente
parent 2349185c96
commit 7c602d9f01
No known key found for this signature in database
GPG key ID: 8A3455EBE455489A
5 changed files with 100 additions and 17 deletions

View file

@ -14,4 +14,19 @@ struct BindingsBuilder
nix::BindingsBuilder builder;
};
struct nix_string_return
{
std::string str;
};
struct nix_printer
{
std::ostream & s;
};
struct nix_string_context
{
nix::NixStringContext & ctx;
};
#endif // NIX_API_EXPR_INTERNAL_H

View file

@ -20,21 +20,6 @@
#include "gc_cpp.h"
#endif
struct nix_string_return
{
std::string str;
};
struct nix_printer
{
std::ostream & s;
};
struct nix_string_context
{
nix::NixStringContext & ctx;
};
void nix_set_string_return(nix_string_return * str, const char * c)
{
str->str = c;

View file

@ -52,7 +52,7 @@ typedef class ListBuilder ListBuilder;
* @ingroup primops
*
* Owned by the GC
* @see nix_alloc_primop, nix_set_primop
* @see nix_alloc_primop, nix_init_primop
*/
typedef struct PrimOp PrimOp;
/** @brief External Value