static const builtin_info_t Math_info = {
JSCLASS_MATH,
{NULL, NULL, 0},
- sizeof(Math_props)/sizeof(*Math_props),
+ ARRAY_SIZE(Math_props),
Math_props,
NULL,
NULL
return hres;
}
- for(i=0; i < sizeof(constants)/sizeof(*constants); i++) {
+ for(i=0; i < ARRAY_SIZE(constants); i++) {
hres = jsdisp_define_data_property(math, constants[i].name, 0,
jsval_number(constants[i].val));
if(FAILED(hres)) {