Skip to content

Commit 1fc1181

Browse files
authored
Typedef char16_t for older MSVC (nodejs#175)
1 parent ada8aa8 commit 1fc1181

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/node_api_types.h

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
#include <stddef.h>
55
#include <stdint.h>
66

7+
#if !defined __cplusplus || (defined(_MSC_VER) && _MSC_VER < 1900)
8+
typedef uint16_t char16_t;
9+
#endif
10+
711
// JSVM API types are all opaque pointers for ABI stability
812
// typedef undefined structs instead of void* for compile time type safety
913
typedef struct napi_env__ *napi_env;

0 commit comments

Comments
 (0)