|
23 | 23 | #include "allocated_buffer-inl.h"
|
24 | 24 | #include "node.h"
|
25 | 25 | #include "node_errors.h"
|
| 26 | +#include "node_external_reference.h" |
26 | 27 | #include "node_internals.h"
|
27 | 28 |
|
28 | 29 | #include "env-inl.h"
|
@@ -1197,7 +1198,45 @@ void Initialize(Local<Object> target,
|
1197 | 1198 | }
|
1198 | 1199 |
|
1199 | 1200 | } // anonymous namespace
|
| 1201 | + |
| 1202 | +void RegisterExternalReferences(ExternalReferenceRegistry* registry) { |
| 1203 | + registry->Register(SetBufferPrototype); |
| 1204 | + registry->Register(CreateFromString); |
| 1205 | + |
| 1206 | + registry->Register(ByteLengthUtf8); |
| 1207 | + registry->Register(Copy); |
| 1208 | + registry->Register(Compare); |
| 1209 | + registry->Register(CompareOffset); |
| 1210 | + registry->Register(Fill); |
| 1211 | + registry->Register(IndexOfBuffer); |
| 1212 | + registry->Register(IndexOfNumber); |
| 1213 | + registry->Register(IndexOfString); |
| 1214 | + |
| 1215 | + registry->Register(Swap16); |
| 1216 | + registry->Register(Swap32); |
| 1217 | + registry->Register(Swap64); |
| 1218 | + |
| 1219 | + registry->Register(EncodeInto); |
| 1220 | + registry->Register(EncodeUtf8String); |
| 1221 | + |
| 1222 | + registry->Register(StringSlice<ASCII>); |
| 1223 | + registry->Register(StringSlice<BASE64>); |
| 1224 | + registry->Register(StringSlice<LATIN1>); |
| 1225 | + registry->Register(StringSlice<HEX>); |
| 1226 | + registry->Register(StringSlice<UCS2>); |
| 1227 | + registry->Register(StringSlice<UTF8>); |
| 1228 | + |
| 1229 | + registry->Register(StringWrite<ASCII>); |
| 1230 | + registry->Register(StringWrite<BASE64>); |
| 1231 | + registry->Register(StringWrite<LATIN1>); |
| 1232 | + registry->Register(StringWrite<HEX>); |
| 1233 | + registry->Register(StringWrite<UCS2>); |
| 1234 | + registry->Register(StringWrite<UTF8>); |
| 1235 | + registry->Register(GetZeroFillToggle); |
| 1236 | +} |
| 1237 | + |
1200 | 1238 | } // namespace Buffer
|
1201 | 1239 | } // namespace node
|
1202 | 1240 |
|
1203 | 1241 | NODE_MODULE_CONTEXT_AWARE_INTERNAL(buffer, node::Buffer::Initialize)
|
| 1242 | +NODE_MODULE_EXTERNAL_REFERENCE(buffer, node::Buffer::RegisterExternalReferences) |
0 commit comments