diff options
author | James M Snell <jasnell@gmail.com> | 2020-04-11 05:42:37 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2020-04-14 03:21:43 +0300 |
commit | cecb08f0c828dd5da8e4c6f8414bb1f9c778319e (patch) | |
tree | 04352ecba6680b8a689c0b3ea8f620de84c5c7b5 /node.gyp | |
parent | 81c03bcebd3841e5bcbd3af0a03e102b80d10d12 (diff) |
src: add AliasedStruct utility
For http2 (and eventually QUIC) we have a struct that is backed
by a v8::BackingStore and exposed to the JavaScript side as an
ArrayBuffer and TypedArray. This is similar to AliasedBuffer
except that it is fronted by a struct on the C++ side.
```c++
struct foo {
uint32_t ex1;
uint32_t ex2;
};
AliasedStruct<foo> foo_;
foo_->ex1 = 1;
foo_->ex2 = 2;
foo_.GetArrayBuffer();
```
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/32778
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Diffstat (limited to 'node.gyp')
-rw-r--r-- | node.gyp | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -631,6 +631,8 @@ 'src/uv.cc', # headers to make for a more pleasant IDE experience 'src/aliased_buffer.h', + 'src/aliased_struct.h', + 'src/aliased_struct-inl.h', 'src/async_wrap.h', 'src/async_wrap-inl.h', 'src/base_object.h', |