simplifications

This commit is contained in:
2026-02-11 13:15:04 -06:00
parent 259bc139fc
commit fbeec17ce5
21 changed files with 190 additions and 685 deletions

View File

@@ -62,7 +62,7 @@ static JSValue js_enet_host_create(JSContext *ctx, JSValueConst this_val, int ar
enet_uint32 outgoing_bandwidth = 0;
JSValue obj;
if (argc < 1 || !JS_IsObject(argv[0])) {
if (argc < 1 || !JS_IsRecord(argv[0])) {
host = enet_host_create(NULL, peer_count, channel_limit, incoming_bandwidth, outgoing_bandwidth);
if (!host) return JS_ThrowInternalError(ctx, "Failed to create ENet client host");
goto wrap;

View File

@@ -132,7 +132,7 @@ JSC_CCALL(socket_getaddrinfo,
// Store the addrinfo pointer as an internal property
// We'll need to handle this differently since we can't wrap it
// For now, we'll skip storing the raw addrinfo
JS_SetPropertyUint32(js, ret, idx++, info);
JS_SetPropertyNumber(js, ret, idx++, info);
}
freeaddrinfo(res);