Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

docs: add parameter docs for ref.reinterpretUntilZeros()

  • Loading branch information...
commit 77bda7fe88210b8daca2278465fe229fb155fba1 1 parent 9c2db73
@TooTallNate authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/ref.js
View
5 lib/ref.js
@@ -773,6 +773,9 @@ exports.reinterpret = function reinterpret (buffer, size) {
* attach _buffer_ to the returned Buffer, which is potentially unsafe if the
* garbage collector runs.
*
+ * @param {Buffer} buffer A Buffer instance to base the returned Buffer off of.
+ * @param {Number} size The number of sequential, aligned `NULL` bytes that are required to terminate the buffer.
+ * @return {Buffer} A new Buffer instance with the same memory address as _buffer_, and a variable `length` that is terminated by _size_ NUL bytes.
* @api private
*/
@@ -795,6 +798,8 @@ exports._reinterpretUntilZeros = exports.reinterpretUntilZeros
* This function "attaches" _buffer_ to the returned Buffer to prevent it from
* being garbage collected.
*
+ * @param {Buffer} buffer A Buffer instance to base the returned Buffer off of.
+ * @param {Number} size The number of sequential, aligned `NULL` bytes are required to terminate the buffer.
* @return {Buffer} A new Buffer instance with the same memory address as _buffer_, and a variable `length` that is terminated by _size_ NUL bytes.
*/
Please sign in to comment.
Something went wrong with that request. Please try again.