Skip to content

Commit e8fd808

Browse files
committed
windows: avoid MSVC warnings about templates not having a dll interface
1 parent 060141c commit e8fd808

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/node_object_wrap.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
#include "v8.h"
2727
#include <assert.h>
2828

29+
// Explicitly instantiate some template classes, so we're sure they will be
30+
// present in the binary / shared object. There isn't much doubt that they will
31+
// be, but MSVC tends to complain about these things.
32+
template class NODE_EXTERN v8::Persistent<v8::Object>;
33+
template class NODE_EXTERN v8::Persistent<v8::FunctionTemplate>;
34+
2935
namespace node {
3036

3137
class NODE_EXTERN ObjectWrap {

0 commit comments

Comments
 (0)