1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
#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;
}
|