blob: 11920bf1c1d187a95fdbdbf631250ed944380899 [file] [log] [blame]
#define NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED
// Should compile without errors
#include "buffer.h"
#include "napi.h"
using namespace Napi;
using namespace test_buffer;
namespace {
#include "buffer_new_or_copy-inl.h"
}
Object InitBufferNoExternal(Env env) {
Object exports = Object::New(env);
exports["createOrCopyExternalBuffer"] =
Function::New(env, CreateOrCopyExternalBuffer);
exports["createOrCopyExternalBufferWithFinalize"] =
Function::New(env, CreateOrCopyExternalBufferWithFinalize);
exports["createOrCopyExternalBufferWithFinalizeHint"] =
Function::New(env, CreateOrCopyExternalBufferWithFinalizeHint);
return exports;
}