{
size_t len;
njs_str_t string, middle;
- njs_int_t rc;
+ njs_int_t ret;
const njs_object_init_t *obj, **p;
const njs_object_prop_t *prop;
const njs_function_init_t *fun;
middle = njs_str_value(".");
- rc = njs_builtin_match(njs_object_init, function, &prop, &obj);
+ ret = njs_builtin_match(njs_object_init, function, &prop, &obj);
- if (rc == NJS_OK) {
+ if (ret == NJS_OK) {
goto found;
}
- rc = njs_builtin_match(njs_prototype_init, function, &prop, &obj);
+ ret = njs_builtin_match(njs_prototype_init, function, &prop, &obj);
- if (rc == NJS_OK) {
+ if (ret == NJS_OK) {
middle = njs_str_value(".prototype.");
goto found;
}
- rc = njs_builtin_match(njs_constructor_init, function, &prop, &obj);
+ ret = njs_builtin_match(njs_constructor_init, function, &prop, &obj);
- if (rc == NJS_OK) {
+ if (ret == NJS_OK) {
goto found;
}
}
}
- rc = njs_builtin_match(njs_module_init, function, &prop, &obj);
+ ret = njs_builtin_match(njs_module_init, function, &prop, &obj);
- if (rc == NJS_OK) {
+ if (ret == NJS_OK) {
goto found;
}
{
u_char *start;
njs_vm_t *vm, *nvm;
- njs_int_t ret, rc;
+ njs_int_t ret;
njs_str_t s;
njs_uint_t i;
njs_stat_t prev;
prev = *stat;
- rc = NJS_ERROR;
+ ret = NJS_ERROR;
for (i = 0; i < num; i++) {
vm = NULL;
}
- rc = NJS_OK;
+ ret = NJS_OK;
done:
njs_unit_test_report(name, &prev, stat);
- return rc;
+ return ret;
}
njs_vm_json_test(njs_opts_t *opts, njs_stat_t *stat)
{
njs_vm_t *vm;
- njs_int_t ret, rc;
+ njs_int_t ret;
njs_str_t s, *script;
njs_uint_t i;
njs_bool_t success;
prev = *stat;
- rc = NJS_ERROR;
+ ret = NJS_ERROR;
for (i = 0; i < njs_nitems(tests); i++) {
}
- rc = NJS_OK;
+ ret = NJS_OK;
done:
- if (rc != NJS_OK) {
+ if (ret != NJS_OK) {
if (njs_vm_retval_string(vm, &s) != NJS_OK) {
njs_printf("njs_vm_retval_string() failed\n");
njs_vm_destroy(vm);
}
- return rc;
+ return ret;
}
njs_api_test(njs_opts_t *opts, njs_stat_t *stat)
{
njs_vm_t *vm;
- njs_int_t ret, rc;
+ njs_int_t ret;
njs_uint_t i;
njs_stat_t prev;
njs_vm_opt_t options;
prev = *stat;
- rc = NJS_ERROR;
+ ret = NJS_ERROR;
for (i = 0; i < njs_nitems(tests); i++) {
vm = njs_vm_create(&options);
vm = NULL;
}
- rc = NJS_OK;
+ ret = NJS_OK;
done:
njs_vm_destroy(vm);
}
- return rc;
+ return ret;
}