static const builtin_info_t Error_info = {
JSCLASS_ERROR,
{NULL, Error_value, 0},
- sizeof(Error_props)/sizeof(*Error_props),
+ ARRAY_SIZE(Error_props),
Error_props,
NULL,
NULL
jsstr_t *str;
HRESULT hres;
- for(i=0; i < sizeof(names)/sizeof(names[0]); i++) {
+ for(i=0; i < ARRAY_SIZE(names); i++) {
hres = alloc_error(ctx, i==0 ? object_prototype : NULL, NULL, &err);
if(FAILED(hres))
return hres;
return error;
buf[0] = '\0';
- LoadStringW(jscript_hinstance, HRESULT_CODE(error), buf, sizeof(buf)/sizeof(WCHAR));
+ LoadStringW(jscript_hinstance, HRESULT_CODE(error), buf, ARRAY_SIZE(buf));
if(str) pos = strchrW(buf, '|');
if(pos) {