mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 19:46:02 +01:00
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.
This commit is contained in:
parent
1935c19705
commit
7e4608a3f8
11 changed files with 48 additions and 0 deletions
|
|
@ -9,6 +9,8 @@
|
|||
|
||||
#include "nix_api_util_config.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
nix_c_context * nix_c_context_create()
|
||||
{
|
||||
return new nix_c_context();
|
||||
|
|
@ -156,3 +158,5 @@ nix_err call_nix_get_string_callback(const std::string str, nix_get_string_callb
|
|||
callback(str.c_str(), str.size(), user_data);
|
||||
return NIX_OK;
|
||||
}
|
||||
|
||||
} // extern "C"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue