1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-07 09:31:01 +01:00
nix/src/libmain-c/nix_api_main.cc
John Ericson 7e4608a3f8 More extern "C" for FFI
This allows us to catch the header and file getting out of sync, because
we are not doing overloading by mistake.
2025-09-03 22:50:42 +02:00

20 lines
363 B
C++

#include "nix_api_store.h"
#include "nix_api_store_internal.h"
#include "nix_api_util.h"
#include "nix_api_util_internal.h"
#include "nix/main/plugin.hh"
extern "C" {
nix_err nix_init_plugins(nix_c_context * context)
{
if (context)
context->last_err_code = NIX_OK;
try {
nix::initPlugins();
}
NIXC_CATCH_ERRS
}
} // extern "C"