@@ -16,16 +16,16 @@ using v8::String;
1616template <typename T, size_t N, T P>
1717struct ExternalStringResource ;
1818
19- template <size_t N, const char (&P)[N] >
20- struct ExternalStringResource<const char[N] , N, P>
19+ template <size_t N, const char * P >
20+ struct ExternalStringResource <const char * , N, P>
2121 : public String::ExternalOneByteStringResource {
2222 const char * data () const override { return P; }
2323 size_t length () const override { return N; }
2424 void Dispose () override { /* Default calls `delete this`. */ }
2525};
2626
27- template <size_t N, const uint16_t (&P)[N] >
28- struct ExternalStringResource<const uint16_t[N] , N, P>
27+ template <size_t N, const uint16_t * P >
28+ struct ExternalStringResource <const uint16_t * , N, P>
2929 : public String::ExternalStringResource {
3030 const uint16_t * data () const override { return P; }
3131 size_t length () const override { return N; }
@@ -34,7 +34,7 @@ struct ExternalStringResource<const uint16_t[N], N, P>
3434
3535// id##_data is defined in node_natives.h.
3636#define V (id ) \
37- static ExternalStringResource<decltype (id##_data), \
37+ static ExternalStringResource<decltype (& id##_data[ 0 ]), \
3838 arraysize (id##_data), \
3939 id##_data> id##_external_data;
4040NODE_NATIVES_MAP (V)
0 commit comments