void JObject::Ref() { if (JVAL_IS_STRING(&_obj_val)) { jerry_api_acquire_string(_obj_val.v_string); } else if (JVAL_IS_OBJECT(&_obj_val)) { jerry_api_acquire_object(_obj_val.v_object); } }
/** * Initialize Jerry API value with specified object */ static void test_api_init_api_value_object (jerry_api_value_t *out_value_p, /**< out: API value */ jerry_api_object_t* v) /**< object value to initialize with */ { jerry_api_acquire_object (v); out_value_p->type = JERRY_API_DATA_TYPE_OBJECT; out_value_p->v_object = v; } /* test_api_init_api_value_object */