length
This commit is contained in:
@@ -36282,15 +36282,6 @@ static JSValue js_blob_pad_q(JSContext *ctx, JSValueConst this_val,
|
||||
return JS_NewBool(ctx, blob_pad_check(bd, from, block_size));
|
||||
}
|
||||
|
||||
/* blob.length getter */
|
||||
static JSValue js_blob_get_length(JSContext *ctx, JSValueConst this_val)
|
||||
{
|
||||
blob *bd = js_get_blob(ctx, this_val);
|
||||
if (!bd)
|
||||
return JS_ThrowTypeError(ctx, "length: not called on a blob");
|
||||
return JS_NewInt64(ctx, bd->length);
|
||||
}
|
||||
|
||||
static const JSCFunctionListEntry js_blob_proto_funcs[] = {
|
||||
/* Write methods */
|
||||
JS_CFUNC_DEF("write_bit", 1, js_blob_write_bit),
|
||||
@@ -36310,9 +36301,6 @@ static const JSCFunctionListEntry js_blob_proto_funcs[] = {
|
||||
JS_CFUNC_DEF("read_fit", 2, js_blob_read_fit),
|
||||
JS_CFUNC_DEF("read_text", 1, js_blob_read_text),
|
||||
JS_CFUNC_DEF("pad?", 2, js_blob_pad_q),
|
||||
|
||||
/* Length property getter */
|
||||
JS_CGETSET_DEF("length", js_blob_get_length, NULL),
|
||||
};
|
||||
|
||||
/* ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user