mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
src: fix v8 api deprecation
PR-URL: https://github.com/nodejs/node/pull/35700 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com>
This commit is contained in:
parent
b9ce4b4280
commit
6f9cbcf6a6
@ -1944,7 +1944,7 @@ static void WriteString(const FunctionCallbackInfo<Value>& args) {
|
||||
auto ext = string->GetExternalOneByteStringResource();
|
||||
buf = const_cast<char*>(ext->data());
|
||||
len = ext->length();
|
||||
} else if (enc == UCS2 && IsLittleEndian() && string->IsExternal()) {
|
||||
} else if (enc == UCS2 && IsLittleEndian() && string->IsExternalTwoByte()) {
|
||||
auto ext = string->GetExternalStringResource();
|
||||
buf = reinterpret_cast<char*>(const_cast<uint16_t*>(ext->data()));
|
||||
len = ext->length() * sizeof(*ext->data());
|
||||
|
Loading…
Reference in New Issue
Block a user