diff options
author | Bert Belder <info@2bs.nl> | 2012-08-20 19:13:05 +0300 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2012-08-20 18:42:05 +0200 |
commit | d38d7bea6c08ba9b1367ebd44f9ade1154e3d04d (patch) | |
tree | 814be62ffe047279397ec858f3930998a4067b35 /src | |
parent | b1ffbdc975d58b31e3b13749c29fdc07049ea1d9 (diff) | |
download | nodejs-d38d7bea6c08ba9b1367ebd44f9ade1154e3d04d.tar.gz nodejs-d38d7bea6c08ba9b1367ebd44f9ade1154e3d04d.tar.bz2 nodejs-d38d7bea6c08ba9b1367ebd44f9ade1154e3d04d.zip |
unix: don't explicitly instantiate v8::Persistent<x> templates
These explicit instantiations were added to make MSVC happy. It turns
out that some older versions of gcc and llvm now complain about duplicate
symbols, so we instantiate these templates only when MSVC is used.
Diffstat (limited to 'src')
-rw-r--r-- | src/node_object_wrap.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/node_object_wrap.h b/src/node_object_wrap.h index 62ea24448..32d584c84 100644 --- a/src/node_object_wrap.h +++ b/src/node_object_wrap.h @@ -29,8 +29,11 @@ // Explicitly instantiate some template classes, so we're sure they will be // present in the binary / shared object. There isn't much doubt that they will // be, but MSVC tends to complain about these things. -template class NODE_EXTERN v8::Persistent<v8::Object>; -template class NODE_EXTERN v8::Persistent<v8::FunctionTemplate>; +#ifdef _MSC_VER + template class NODE_EXTERN v8::Persistent<v8::Object>; + template class NODE_EXTERN v8::Persistent<v8::FunctionTemplate>; +#endif + namespace node { |