Commit 2377ea87 authored by Jérémy Lal's avatar Jérémy Lal

Imported Upstream version 0.6.12~dfsg1

parent 1c693216
......@@ -172,6 +172,7 @@ Scott McWhirter <scott.mcwhirter@joyent.com>
Jakub Lekstan <jakub.lekstan@dreamlab.pl>
Tim Baumann <tim@timbaumann.info>
Robert Mustacchi <rm@joyent.com>
Håvard Stranden <havard.stranden@gmail.com>
George Miroshnykov <george.miroshnykov@gmail.com>
Marcel Laverdet <marcel@laverdet.com>
Alexandre Marangone <a.marangone@gmail.com>
......
2012.02.17 Version 0.6.11 (stable)
2012.03.02 Version 0.6.12 (stable)
* Upgrade V8 to 3.6.6.24
* dtrace ustack helper improvements (Dave Pacheco)
* API Documentation refactor (isaacs)
* #2827 net: fix race write() before and after connect() (koichik)
* #2554 #2567 throw if fs args for 'start' or 'end' are strings (AJ ONeal)
* punycode: Update to v1.0.0 (Mathias Bynens)
* Make a fat binary for the OS X pkg (isaacs)
* Fix hang on accessing process.stdin (isaacs)
* repl: make tab completion work on non-objects (Nathan Rajlich)
* Fix fs.watch on OS X (Ben Noordhuis)
* Fix #2515 nested setTimeouts cause premature process exit (Ben Noordhuis)
* windows: fix time conversion in stat (Igor Zinkovsky)
* windows: fs: handle EOF in read (Brandon Philips)
* windows: avoid IOCP short-circuit on non-ifs lsps (Igor Zinkovsky)
* Upgrade npm to 1.1.4 (isaacs)
- windows fixes
- Bundle nested bundleDependencies properly
- install: support --save with url install targets
- shrinkwrap: behave properly with url-installed modules
- support installing uncompressed tars or single file modules from urls etc.
- don't run make clean on rebuild
- support HTTPS-over-HTTP proxy tunneling
2012.02.17 Version 0.6.11 (stable), 1eb1fe32250fc88cb5b0a97cddf3e02be02e3f4a
* http: allow multiple WebSocket RFC6455 headers (Einar Otto Stangvik)
......
......@@ -78,12 +78,15 @@ test-npm-publish: all
out/Release/node: all
apidoc_sources = $(wildcard doc/api/*.markdown)
apidocs = $(addprefix out/,$(apidoc_sources:.markdown=.html))
apidocs = $(addprefix out/,$(apidoc_sources:.markdown=.html)) \
$(addprefix out/,$(apidoc_sources:.markdown=.json))
apidoc_dirs = out/doc out/doc/api/ out/doc/api/assets out/doc/about out/doc/community out/doc/logos
apidoc_dirs = out/doc out/doc/api/ out/doc/api/assets out/doc/about out/doc/community out/doc/logos out/doc/images
apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*)))
doc_images = $(addprefix out/,$(wildcard doc/images/* doc/*.jpg doc/*.png))
website_files = \
out/doc/index.html \
out/doc/v0.4_announcement.html \
......@@ -92,35 +95,14 @@ website_files = \
out/doc/sh_javascript.min.js \
out/doc/sh_vim-dark.css \
out/doc/sh.css \
out/doc/logo.png \
out/doc/favicon.ico \
out/doc/pipe.css \
out/doc/about/index.html \
out/doc/close-downloads.png \
out/doc/community/index.html \
out/doc/community/not-invented-here.png \
out/doc/logos/index.html \
out/doc/microsoft-logo.png \
out/doc/ryan-speaker.jpg \
out/doc/download-logo.png \
out/doc/ebay-logo.png \
out/doc/footer-logo-alt.png \
out/doc/footer-logo.png \
out/doc/icons-interior.png \
out/doc/icons.png \
out/doc/home-icons.png \
out/doc/joyent-logo_orange_nodeorg-01.png \
out/doc/linkedin-logo.png \
out/doc/logo-light.png \
out/doc/mac_osx_nodejs_installer_logo.png \
out/doc/microsoft-logo.png \
out/doc/platform-icons.png \
out/doc/sponsored.png \
out/doc/twitter-bird.png \
out/doc/community-icons.png \
out/doc/yahoo-logo.png
doc docs: out/Release/node $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs)
$(doc_images)
doc: node $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs) tools/doc/
$(apidoc_dirs):
mkdir -p $@
......@@ -129,10 +111,13 @@ out/doc/api/assets/%: doc/api_assets/% out/doc/api/assets/
cp $< $@
out/doc/%: doc/%
cp $< $@
cp -r $< $@
out/doc/api/%.json: doc/api/%.markdown
out/Release/node tools/doc/generate.js --format=json $< > $@
out/doc/api/%.html: doc/api/%.markdown out/Release/node $(apidoc_dirs) $(apiassets) tools/doctool/doctool.js
out/Release/node tools/doctool/doctool.js doc/template.html $< > $@
out/doc/api/%.html: doc/api/%.markdown
out/Release/node tools/doc/generate.js --format=html --template=doc/template.html $< > $@
out/doc/%:
......@@ -173,8 +158,19 @@ pkg: $(PKG)
$(PKG):
-rm -rf $(PKGDIR)
# Need to remove deps between architecture changes.
rm -rf out/*/deps
$(WAF) configure --prefix=/usr/local --without-snapshot --dest-cpu=ia32
CFLAGS=-m32 DESTDIR=$(PKGDIR) $(WAF) install
CFLAGS=-m32 DESTDIR=$(PKGDIR)/32 $(WAF) install
rm -rf out/*/deps
$(WAF) configure --prefix=/usr/local --without-snapshot --dest-cpu=x64
CFLAGS=-m64 DESTDIR=$(PKGDIR) $(WAF) install
lipo $(PKGDIR)/32/usr/local/bin/node \
$(PKGDIR)/usr/local/bin/node \
-output $(PKGDIR)/usr/local/bin/node-universal \
-create
mv $(PKGDIR)/usr/local/bin/node-universal $(PKGDIR)/usr/local/bin/node
rm -rf $(PKGDIR)/32
$(packagemaker) \
--id "org.nodejs.NodeJS-$(VERSION)" \
--doc tools/osx-pkg.pmdoc \
......@@ -186,7 +182,7 @@ $(TARBALL): out/doc
cp doc/node.1 $(TARNAME)/doc/node.1
cp -r out/doc/api $(TARNAME)/doc/api
rm -rf $(TARNAME)/deps/v8/test # too big
rm -rf $(TARNAME)/doc/logos # too big
rm -rf $(TARNAME)/doc/images # too big
tar -cf $(TARNAME).tar $(TARNAME)
rm -rf $(TARNAME)
gzip -f -9 $(TARNAME).tar
......
......@@ -66,7 +66,6 @@ static void uv__finish_close(uv_handle_t* handle);
void uv_close(uv_handle_t* handle, uv_close_cb close_cb) {
uv_udp_t* udp;
uv_async_t* async;
uv_timer_t* timer;
uv_stream_t* stream;
uv_process_t* process;
......@@ -123,11 +122,7 @@ void uv_close(uv_handle_t* handle, uv_close_cb close_cb) {
break;
case UV_TIMER:
timer = (uv_timer_t*)handle;
if (ev_is_active(&timer->timer_watcher)) {
ev_ref(timer->loop->ev);
}
ev_timer_stop(timer->loop->ev, &timer->timer_watcher);
uv_timer_stop((uv_timer_t*)handle);
break;
case UV_PROCESS:
......@@ -524,10 +519,23 @@ int uv_async_send(uv_async_t* async) {
}
static int uv__timer_active(const uv_timer_t* timer) {
return timer->flags & UV_TIMER_ACTIVE;
}
static int uv__timer_repeating(const uv_timer_t* timer) {
return timer->flags & UV_TIMER_REPEAT;
}
static void uv__timer_cb(EV_P_ ev_timer* w, int revents) {
uv_timer_t* timer = w->data;
if (!ev_is_active(w)) {
assert(uv__timer_active(timer));
if (!uv__timer_repeating(timer)) {
timer->flags &= ~UV_TIMER_ACTIVE;
ev_ref(EV_A);
}
......@@ -550,43 +558,61 @@ int uv_timer_init(uv_loop_t* loop, uv_timer_t* timer) {
int uv_timer_start(uv_timer_t* timer, uv_timer_cb cb, int64_t timeout,
int64_t repeat) {
if (ev_is_active(&timer->timer_watcher)) {
if (uv__timer_active(timer)) {
return -1;
}
timer->timer_cb = cb;
timer->flags |= UV_TIMER_ACTIVE;
if (repeat)
timer->flags |= UV_TIMER_REPEAT;
else
timer->flags &= ~UV_TIMER_REPEAT;
ev_timer_set(&timer->timer_watcher, timeout / 1000.0, repeat / 1000.0);
ev_timer_start(timer->loop->ev, &timer->timer_watcher);
ev_unref(timer->loop->ev);
return 0;
}
int uv_timer_stop(uv_timer_t* timer) {
if (ev_is_active(&timer->timer_watcher)) {
if (uv__timer_active(timer)) {
ev_ref(timer->loop->ev);
}
timer->flags &= ~(UV_TIMER_ACTIVE | UV_TIMER_REPEAT);
ev_timer_stop(timer->loop->ev, &timer->timer_watcher);
return 0;
}
int uv_timer_again(uv_timer_t* timer) {
if (!ev_is_active(&timer->timer_watcher)) {
if (!uv__timer_active(timer)) {
uv__set_sys_error(timer->loop, EINVAL);
return -1;
}
assert(uv__timer_repeating(timer));
ev_timer_again(timer->loop->ev, &timer->timer_watcher);
return 0;
}
void uv_timer_set_repeat(uv_timer_t* timer, int64_t repeat) {
assert(timer->type == UV_TIMER);
timer->timer_watcher.repeat = repeat / 1000.0;
if (repeat)
timer->flags |= UV_TIMER_REPEAT;
else
timer->flags &= ~UV_TIMER_REPEAT;
}
int64_t uv_timer_get_repeat(uv_timer_t* timer) {
assert(timer->type == UV_TIMER);
return (int64_t)(1000 * timer->timer_watcher.repeat);
......
......@@ -151,7 +151,9 @@ enum {
UV_READABLE = 0x20, /* The stream is readable */
UV_WRITABLE = 0x40, /* The stream is writable */
UV_TCP_NODELAY = 0x080, /* Disable Nagle. */
UV_TCP_KEEPALIVE = 0x100 /* Turn on keep-alive. */
UV_TCP_KEEPALIVE = 0x100, /* Turn on keep-alive. */
UV_TIMER_ACTIVE = 0x080,
UV_TIMER_REPEAT = 0x100
};
size_t uv__strlcpy(char* dst, const char* src, size_t size);
......
......@@ -68,11 +68,12 @@ static void uv__fs_event(EV_P_ ev_io* w, int revents) {
handle->cb(handle, NULL, events, 0);
uv__fs_event_stop(handle);
if (handle->fd == -1)
return;
/* File watcher operates in one-shot mode, re-arm it. */
if (handle->fd != -1)
uv__fs_event_start(handle);
uv__fs_event_stop(handle);
uv__fs_event_start(handle);
}
......
......@@ -294,6 +294,7 @@ void fs__read(uv_fs_t* req, uv_file file, void *buf, size_t length,
OVERLAPPED overlapped, *overlapped_ptr;
LARGE_INTEGER offset_;
DWORD bytes;
DWORD error;
VERIFY_UV_FILE(file, req);
......@@ -323,7 +324,12 @@ void fs__read(uv_fs_t* req, uv_file file, void *buf, size_t length,
if (ReadFile(handle, buf, length, &bytes, overlapped_ptr)) {
SET_REQ_RESULT(req, bytes);
} else {
SET_REQ_WIN32_ERROR(req, GetLastError());
error = GetLastError();
if (error == ERROR_HANDLE_EOF) {
SET_REQ_RESULT(req, bytes);
} else {
SET_REQ_WIN32_ERROR(req, error);
}
}
}
......
......@@ -337,6 +337,10 @@ int WSAAPI uv_wsarecvfrom_workaround(SOCKET socket, WSABUF* buffers,
/* Whether ipv6 is supported */
extern int uv_allow_ipv6;
/* Whether there are any non-IFS LSPs stacked on TCP */
extern int uv_tcp_non_ifs_lsp_ipv4;
extern int uv_tcp_non_ifs_lsp_ipv6;
/* Ip address used to bind to any port at any interface */
extern struct sockaddr_in uv_addr_ip4_any_;
extern struct sockaddr_in6 uv_addr_ip6_any_;
......
......@@ -85,6 +85,7 @@ static int uv__tcp_keepalive(uv_tcp_t* handle, SOCKET socket, int enable, unsign
static int uv_tcp_set_socket(uv_loop_t* loop, uv_tcp_t* handle,
SOCKET socket, int imported) {
DWORD yes = 1;
int non_ifs_lsp;
assert(handle->socket == INVALID_SOCKET);
......@@ -114,7 +115,10 @@ static int uv_tcp_set_socket(uv_loop_t* loop, uv_tcp_t* handle,
}
}
if (pSetFileCompletionNotificationModes) {
non_ifs_lsp = (handle->flags & UV_HANDLE_IPV6) ? uv_tcp_non_ifs_lsp_ipv6 :
uv_tcp_non_ifs_lsp_ipv4;
if (pSetFileCompletionNotificationModes && !non_ifs_lsp) {
if (pSetFileCompletionNotificationModes((HANDLE) socket,
FILE_SKIP_SET_EVENT_ON_HANDLE |
FILE_SKIP_COMPLETION_PORT_ON_SUCCESS)) {
......@@ -1039,6 +1043,10 @@ int uv_tcp_import(uv_tcp_t* tcp, WSAPROTOCOL_INFOW* socket_protocol_info) {
tcp->flags |= UV_HANDLE_BOUND;
tcp->flags |= UV_HANDLE_SHARED_TCP_SERVER;
if (socket_protocol_info->iAddressFamily == AF_INET6) {
tcp->flags |= UV_HANDLE_IPV6;
}
return uv_tcp_set_socket(tcp->loop, tcp, socket, 1);
}
......
......@@ -253,6 +253,7 @@ void uv_filetime_to_time_t(FILETIME* file_time, time_t* stat_time) {
time.tm_hour = system_time.wHour;
time.tm_min = system_time.wMinute;
time.tm_sec = system_time.wSecond;
time.tm_isdst = -1;
*stat_time = mktime(&time);
} else {
......
......@@ -28,6 +28,10 @@
/* Whether ipv6 is supported */
int uv_allow_ipv6;
/* Whether there are any non-IFS LSPs stacked on TCP */
int uv_tcp_non_ifs_lsp_ipv4;
int uv_tcp_non_ifs_lsp_ipv6;
/* Ip address used to bind to any port at any interface */
struct sockaddr_in uv_addr_ip4_any_;
struct sockaddr_in6 uv_addr_ip6_any_;
......@@ -80,7 +84,9 @@ void uv_winsock_init() {
WSADATA wsa_data;
int errorno;
SOCKET dummy6;
SOCKET dummy;
WSAPROTOCOL_INFOW protocol_info;
int opt_len;
/* Initialize winsock */
errorno = WSAStartup(MAKEWORD(2, 2), &wsa_data);
......@@ -92,11 +98,48 @@ void uv_winsock_init() {
uv_addr_ip4_any_ = uv_ip4_addr("0.0.0.0", 0);
uv_addr_ip6_any_ = uv_ip6_addr("::", 0);
/* Detect IPV6 support */
dummy6 = socket(AF_INET6, SOCK_STREAM, IPPROTO_IP);
if (dummy6 != INVALID_SOCKET) {
/* Detect non-IFS LSPs */
dummy = socket(AF_INET, SOCK_STREAM, IPPROTO_IP);
if (dummy == INVALID_SOCKET) {
uv_fatal_error(WSAGetLastError(), "socket");
}
opt_len = (int) sizeof protocol_info;
if (!getsockopt(dummy,
SOL_SOCKET,
SO_PROTOCOL_INFOW,
(char*) &protocol_info,
&opt_len) == SOCKET_ERROR) {
uv_fatal_error(WSAGetLastError(), "socket");
}
if (!(protocol_info.dwServiceFlags1 & XP1_IFS_HANDLES)) {
uv_tcp_non_ifs_lsp_ipv4 = 1;
}
if (closesocket(dummy) == SOCKET_ERROR) {
uv_fatal_error(WSAGetLastError(), "closesocket");
}
/* Detect IPV6 support and non-IFS LSPs */
dummy = socket(AF_INET6, SOCK_STREAM, IPPROTO_IP);
if (dummy != INVALID_SOCKET) {
uv_allow_ipv6 = TRUE;
if (closesocket(dummy6) == SOCKET_ERROR) {
opt_len = (int) sizeof protocol_info;
if (!getsockopt(dummy,
SOL_SOCKET,
SO_PROTOCOL_INFOW,
(char*) &protocol_info,
&opt_len) == SOCKET_ERROR) {
uv_fatal_error(WSAGetLastError(), "socket");
}
if (!(protocol_info.dwServiceFlags1 & XP1_IFS_HANDLES)) {
uv_tcp_non_ifs_lsp_ipv6 = 1;
}
if (closesocket(dummy) == SOCKET_ERROR) {
uv_fatal_error(WSAGetLastError(), "closesocket");
}
}
......
......@@ -47,7 +47,7 @@ namespace v8 {
namespace internal {
static inline double JunkStringValue() {
return std::numeric_limits<double>::quiet_NaN();
return BitCast<double, uint64_t>(kQuietNaNMask);
}
......
......@@ -28,8 +28,6 @@
#ifndef V8_CONVERSIONS_H_
#define V8_CONVERSIONS_H_
#include <limits>
#include "utils.h"
namespace v8 {
......
This diff is collapsed.
......@@ -255,6 +255,10 @@ const int kBinary32MinExponent = 0x01;
const int kBinary32MantissaBits = 23;
const int kBinary32ExponentShift = 23;
// Quiet NaNs have bits 51 to 62 set, possibly the sign bit, and no
// other bits set.
const uint64_t kQuietNaNMask = static_cast<uint64_t>(0xfff) << 51;
// ASCII/UC16 constants
// Code-point values in Unicode 4.0 are 21 bits wide.
typedef uint16_t uc16;
......
......@@ -10006,6 +10006,9 @@ template MaybeObject* Dictionary<SeededNumberDictionaryShape, uint32_t>::AtPut(
template MaybeObject* Dictionary<UnseededNumberDictionaryShape, uint32_t>::
AtPut(uint32_t, Object*);
template Object* Dictionary<SeededNumberDictionaryShape, uint32_t>::
SlowReverseLookup(Object* value);
template Object* Dictionary<UnseededNumberDictionaryShape, uint32_t>::
SlowReverseLookup(Object* value);
......
......@@ -986,7 +986,8 @@ class Smi: public Object {
void SmiVerify();
#endif
static const int kMinValue = (-1 << (kSmiValueSize - 1));
static const int kMinValue =
(static_cast<unsigned int>(-1)) << (kSmiValueSize - 1);
static const int kMaxValue = -(kMinValue + 1);
private:
......
......@@ -98,10 +98,6 @@ const int kPageSizeBits = 13;
const int kProcessorCacheLineSize = 64;
// Constants relevant to double precision floating point numbers.
// Quiet NaNs have bits 51 to 62 set, possibly the sign bit, and no
// other bits set.
const uint64_t kQuietNaNMask = static_cast<uint64_t>(0xfff) << 51;
// If looking only at the top 32 bits, the QNaN mask is bits 19 to 30.
const uint32_t kQuietNaNHighBitsMask = 0xfff << (51 - 32);
......
......@@ -35,7 +35,7 @@
#define MAJOR_VERSION 3
#define MINOR_VERSION 6
#define BUILD_NUMBER 6
#define PATCH_LEVEL 20
#define PATCH_LEVEL 24
// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
#define IS_CANDIDATE_VERSION 0
......
<!doctype html>
<html>
<html lang="en">
<head>
<meta charset="utf-8">
<style>
......@@ -21,7 +21,7 @@
<body class="alt int" id="about">
<div id="intro" class="interior">
<a href="/" title="Go back to the home page">
<img id="logo" src="../logo-light.png" alt="node.js">
<img id="logo" src="http://nodejs.org/images/logo-light.png" alt="node.js">
</a>
</div>
<div id="content" class="clearfix">
......@@ -102,7 +102,7 @@ console.log('Server running at http://127.0.0.1:1337/');</pre>
<p>But what about multiple-processor concurrency? Aren't
threads necessary to scale programs to multi-core computers?
You can start new processes via <code><a
href="http://nodejs.org/docs/latest/api/child_processes.html#child_process.fork">child_process.fork()</a></code>
href="http://nodejs.org/docs/latest/api/child_process.html#child_process.fork">child_process.fork()</a></code>
these other processes will be scheduled in parallel. For load
balancing incoming connections across multiple processes use
<a href="http://nodejs.org/docs/latest/api/cluster.html">the
......@@ -130,7 +130,7 @@ console.log('Server running at http://127.0.0.1:1337/');</pre>
<li><a href="http://twitter.com/nodejs" class="twitter">@nodejs</a></li>
</ul>
<p>Copyright 2010 <a href="http://joyent.com">Joyent, Inc</a>, Node.js is a <a href="/trademark-policy.pdf">trademark</a> of Joyent, Inc. View <a href="https://raw.github.com/joyent/node/v0.6.11/LICENSE">license</a>.</p>
<p>Copyright 2010 <a href="http://joyent.com">Joyent, Inc</a>, Node.js is a <a href="/trademark-policy.pdf">trademark</a> of Joyent, Inc. View <a href="https://raw.github.com/joyent/node/v0.6.12/LICENSE">license</a>.</p>
</div>
......
## Table of Contents
* [About these Docs](documentation.html)
* [Synopsis](synopsis.html)
* [Globals](globals.html)
* [STDIO](stdio.html)
......@@ -9,8 +8,8 @@
* [Process](process.html)
* [Utilities](util.html)
* [Events](events.html)
* [Buffers](buffers.html)
* [Streams](streams.html)
* [Buffer](buffer.html)
* [Stream](stream.html)
* [Crypto](crypto.html)
* [TLS/SSL](tls.html)
* [String Decoder](string_decoder.html)
......@@ -26,7 +25,7 @@
* [Readline](readline.html)
* [REPL](repl.html)
* [VM](vm.html)
* [Child Processes](child_processes.html)
* [Child Processes](child_process.html)
* [Assertion Testing](assert.html)
* [TTY](tty.html)
* [ZLIB](zlib.html)
......@@ -35,4 +34,3 @@
* [Cluster](cluster.html)
* Appendixes
* [Appendix 1: Recommended Third-party Modules](appendix_1.html)
* [Appendix 2: Deprecated API's](appendix_2.html)
## Addons
# Addons
Addons are dynamically linked shared objects. They can provide glue to C and
C++ libraries. The API (at the moment) is rather complex, involving
......@@ -24,7 +24,7 @@ compiling your module, you don't need to worry about linking to any of these
libraries.
### Hello world
## Hello world
To get started let's make a small Addon which is the C++ equivalent of
the following Javascript code:
......@@ -129,7 +129,7 @@ In cases where there is more than one `.cc` file, simply add the file name to th
obj.source = ['addon.cc', 'myexample.cc']
#### Function arguments
### Function arguments
The following pattern illustrates how to read arguments from JavaScript
function calls and return a result. This is the main and only needed source
......@@ -172,7 +172,7 @@ You can test it with the following JavaScript snippet:
console.log( 'This should be eight:', addon.add(3,5) );
#### Callbacks
### Callbacks
You can pass JavaScript functions to a C++ function and execute them from
there. Here's `addon.cc`:
......@@ -209,7 +209,7 @@ To test it run the following JavaScript snippet:
});
#### Object factory
### Object factory
You can create and return new objects from within a C++ function with this
`addon.cc` pattern, which returns an object with property `msg` that echoes
......@@ -245,7 +245,7 @@ To test it in JavaScript:
console.log(obj1.msg+' '+obj2.msg); // 'hello world'
#### Function factory
### Function factory
This pattern illustrates how to create and return a JavaScript function that
wraps a C++ function:
......@@ -286,7 +286,7 @@ To test:
console.log(fn()); // 'hello world'
#### Wrapping C++ objects
### Wrapping C++ objects
Here we will create a wrapper for a C++ object/class `MyObject` that can be
instantiated in JavaScript through the `new` operator. First prepare the main
......@@ -381,7 +381,7 @@ Test it with:
console.log( obj.plusOne() ); // 13
#### Factory of wrapped objects
### Factory of wrapped objects
This is useful when you want to be able to create native objects without
explicitly instantiating them with the `new` operator in JavaScript, e.g.
......@@ -507,7 +507,7 @@ Test it with:
console.log( obj2.plusOne() ); // 23
#### Passing wrapped objects around
### Passing wrapped objects around
In addition to wrapping and returning C++ objects, you can pass them around
by unwrapping them with Node's `node::ObjectWrap::Unwrap` helper function.
......
@include documentation
@include synopsis
@include globals
@include stdio
......@@ -5,12 +6,10 @@
@include modules
@include addons
@include process
@include constants
@include util
@include freelist
@include events
@include buffers
@include streams
@include buffer
@include stream
@include crypto
@include tls
@include string_decoder
......@@ -26,14 +25,11 @@
@include readline
@include repl