mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2025-01-31 15:36:47 +02:00
C API: fix: macos doesn't have std::bind_front
This commit is contained in:
parent
ab9250286a
commit
c6e28d8da2
1 changed files with 2 additions and 1 deletions
|
@ -62,6 +62,7 @@ PrimOp * nix_alloc_primop(
|
||||||
if (context)
|
if (context)
|
||||||
context->last_err_code = NIX_OK;
|
context->last_err_code = NIX_OK;
|
||||||
try {
|
try {
|
||||||
|
using namespace std::placeholders;
|
||||||
auto p = new
|
auto p = new
|
||||||
#ifdef HAVE_BOEHMGC
|
#ifdef HAVE_BOEHMGC
|
||||||
(GC)
|
(GC)
|
||||||
|
@ -71,7 +72,7 @@ PrimOp * nix_alloc_primop(
|
||||||
.args = {},
|
.args = {},
|
||||||
.arity = (size_t) arity,
|
.arity = (size_t) arity,
|
||||||
.doc = doc,
|
.doc = doc,
|
||||||
.fun = std::bind_front(nix_c_primop_wrapper, fun, user_data)};
|
.fun = std::bind(nix_c_primop_wrapper, fun, user_data, _1, _2, _3, _4)};
|
||||||
if (args)
|
if (args)
|
||||||
for (size_t i = 0; args[i]; i++)
|
for (size_t i = 0; args[i]; i++)
|
||||||
p->args.emplace_back(*args);
|
p->args.emplace_back(*args);
|
||||||
|
|
Loading…
Reference in a new issue