diff options
author | Bryan English <bryan@bryanenglish.com> | 2017-10-22 09:25:59 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2017-10-25 20:36:17 +0300 |
commit | 8172f4547e7e2a7e1b7363e1cb9d7431fad241ff (patch) | |
tree | e3ab9ed28e73f0fcff16491c16b309df3092b2c4 /lib/internal/buffer.js | |
parent | 3621889c800707f3ca720c8de5f05a798a1fe5a8 (diff) |
buffer: move setupBufferJS to internal
Stashing it away in internal/buffer so that it can't be used in
userland, but can still be used in internals.
PR-URL: https://github.com/nodejs/node/pull/16391
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib/internal/buffer.js')
-rw-r--r-- | lib/internal/buffer.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/internal/buffer.js b/lib/internal/buffer.js index 178a475715e..105ff4132a9 100644 --- a/lib/internal/buffer.js +++ b/lib/internal/buffer.js @@ -1,4 +1,13 @@ 'use strict'; -// This is needed still for FastBuffer -module.exports = {}; +const binding = process.binding('buffer'); +const { setupBufferJS } = binding; + +// Remove from the binding so that function is only available as exported here. +// (That is, for internal use only.) +delete binding.setupBufferJS; + +// FastBuffer wil be inserted here by lib/buffer.js +module.exports = { + setupBufferJS +}; |