mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-12-02 12:08:16 +08:00
improve object_typed_array
This commit is contained in:
parent
45c51eeb26
commit
d494cb3f93
@ -46,7 +46,10 @@ static ret_t object_typed_array_get_prop(object_t* obj, const char* name, value_
|
||||
if (tk_str_eq(name, "size")) {
|
||||
value_set_uint32(v, o->arr->size);
|
||||
ret = RET_OK;
|
||||
} else if (tk_str_eq(name, "byte_size")) {
|
||||
} else if (tk_str_eq(name, "capacity")) {
|
||||
value_set_uint32(v, o->arr->capacity);
|
||||
ret = RET_OK;
|
||||
} else if (tk_str_eq(name, "bytes")) {
|
||||
value_set_uint32(v, o->arr->size * o->arr->element_size);
|
||||
ret = RET_OK;
|
||||
} else if (tk_str_eq(name, "data")) {
|
||||
|
Loading…
Reference in New Issue
Block a user