From b7cfca7c6fb1755f07f2d37f4e3dbddb32c1f23e Mon Sep 17 00:00:00 2001 From: Beth Griggs Date: Mon, 8 May 2017 10:36:41 +0100 Subject: [PATCH] doc: clarify node.js addons are c++ PR-URL: https://github.com/nodejs/node/pull/12898 Fixes: https://github.com/nodejs/node/issues/7129 Reviewed-By: Sam Roberts Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Refael Ackermann Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Rich Trott Reviewed-By: Gibson Fahnestock Reviewed-By: Timothy Gu Reviewed-By: Daniel Bevenius Reviewed-By: Colin Ihrig Reviewed-By: Michael Dawson --- doc/api/_toc.md | 2 +- doc/api/addons.md | 6 +++--- doc/api/n-api.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/api/_toc.md b/doc/api/_toc.md index 32c7c7fa27948a..cc8b3a4ed0d540 100644 --- a/doc/api/_toc.md +++ b/doc/api/_toc.md @@ -7,7 +7,7 @@ * [Assertion Testing](assert.html) * [Buffer](buffer.html) -* [C/C++ Addons](addons.html) +* [C++ Addons](addons.html) * [C/C++ Addons - N-API](n-api.html) * [Child Processes](child_process.html) * [Cluster](cluster.html) diff --git a/doc/api/addons.md b/doc/api/addons.md index 9737d7f44e039a..1799cf7e5d4694 100644 --- a/doc/api/addons.md +++ b/doc/api/addons.md @@ -1,6 +1,6 @@ -# C/C++ Addons +# C++ Addons -Node.js Addons are dynamically-linked shared objects, written in C or C++, that +Node.js Addons are dynamically-linked shared objects, written in C++, that can be loaded into Node.js using the [`require()`][require] function, and used just as if they were an ordinary Node.js module. They are used primarily to provide an interface between JavaScript running in Node.js and C/C++ libraries. @@ -26,7 +26,7 @@ involving knowledge of several components and APIs : off-loading work via libuv to non-blocking system operations, worker threads or a custom use of libuv's threads. - - Internal Node.js libraries. Node.js itself exports a number of C/C++ APIs + - Internal Node.js libraries. Node.js itself exports a number of C++ APIs that Addons can use — the most important of which is the `node::ObjectWrap` class. diff --git a/doc/api/n-api.md b/doc/api/n-api.md index 7530c0b1b4f4d2..348f2ad04466bd 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -12,7 +12,7 @@ compiled for one version to run on later versions of Node.js without recompilation. Addons are built/packaged with the same approach/tools -outlined in the section titled [C/C++ Addons](addons.html). +outlined in the section titled [C++ Addons](addons.html). The only difference is the set of APIs that are used by the native code. Instead of using the V8 or [Native Abstractions for Node.js][] APIs, the functions available in the N-API are used.