@@ -55300,18 +55300,18 @@ uint16_t* JS_ToUnicode(JSContext* ctx, JSValue value, uint32_t* length) {
55300
55300
if (!string->is_wide_char) {
55301
55301
uint8_t* p = string->u.str8;
55302
55302
#if defined(_WIN32)
55303
- int utf16_str_len = MultiByteToWideChar(CP_ACP, 0, reinterpret_cast< const char*> (p), -1, NULL, 0) - 1;
55303
+ int utf16_str_len = MultiByteToWideChar(CP_ACP, 0, ( const char*) (p), -1, NULL, 0) - 1;
55304
55304
if (utf16_str_len == -1) {
55305
- return nullptr ;
55305
+ return NULL ;
55306
55306
}
55307
55307
// Allocate memory for the UTF-16 string, including the null terminator
55308
55308
buffer = (uint16_t*)CoTaskMemAlloc((utf16_str_len + 1) * sizeof(WCHAR));
55309
- if (buffer == nullptr ) {
55310
- return nullptr ;
55309
+ if (buffer == NULL ) {
55310
+ return NULL ;
55311
55311
}
55312
55312
55313
55313
// Convert the ASCII string to UTF-16
55314
- MultiByteToWideChar(CP_ACP, 0, reinterpret_cast< const char*> (p), -1, (WCHAR*)buffer, utf16_str_len + 1);
55314
+ MultiByteToWideChar(CP_ACP, 0, ( const char*) (p), -1, (WCHAR*)buffer, utf16_str_len + 1);
55315
55315
*length = utf16_str_len;
55316
55316
#else
55317
55317
uint32_t len = *length = string->len;
@@ -55368,20 +55368,20 @@ JSAtom JS_NewUnicodeAtom(JSContext* ctx, const uint16_t* code, uint32_t length)
55368
55368
55369
55369
BOOL JS_IsArrayBufferView(JSValue value) {
55370
55370
if (!JS_IsObject(value))
55371
- return false ;
55371
+ return FALSE ;
55372
55372
JSObject* p = JS_VALUE_GET_OBJ(value);
55373
55373
return p->class_id >= JS_CLASS_UINT8C_ARRAY && p->class_id <= JS_CLASS_DATAVIEW;
55374
55374
}
55375
55375
55376
55376
BOOL JS_HasClassId(JSRuntime* runtime, JSClassID classId) {
55377
55377
if (runtime->class_count <= classId)
55378
- return false ;
55378
+ return FALSE ;
55379
55379
return runtime->class_array[classId].class_id == classId;
55380
55380
}
55381
55381
55382
55382
int JS_AtomIs8Bit(JSRuntime* runtime, JSAtom atom) {
55383
55383
if (__JS_AtomIsTaggedInt(atom))
55384
- return true ;
55384
+ return TRUE ;
55385
55385
JSString* string = runtime->atom_array[atom];
55386
55386
return string->is_wide_char == 0;
55387
55387
}
@@ -55509,21 +55509,21 @@ int JS_SetGlobalObjectOpaque(JSContext* ctx, void *opaque) {
55509
55509
55510
55510
JS_BOOL JS_IsProxy(JSValue value) {
55511
55511
if (!JS_IsObject(value))
55512
- return false ;
55512
+ return FALSE ;
55513
55513
JSObject* p = JS_VALUE_GET_OBJ(value);
55514
55514
return p->class_id == JS_CLASS_PROXY;
55515
55515
}
55516
55516
55517
55517
JS_BOOL JS_IsPromise(JSValue value) {
55518
55518
if (!JS_IsObject(value))
55519
- return false ;
55519
+ return FALSE ;
55520
55520
JSObject* p = JS_VALUE_GET_OBJ(value);
55521
55521
return p->class_id == JS_CLASS_PROMISE;
55522
55522
}
55523
55523
55524
55524
BOOL JS_IsArrayBuffer(JSValue value) {
55525
55525
if (!JS_IsObject(value))
55526
- return false ;
55526
+ return FALSE ;
55527
55527
JSObject* p = JS_VALUE_GET_OBJ(value);
55528
55528
return p->class_id == JS_CLASS_ARRAY_BUFFER;
55529
55529
}
0 commit comments