Update the webpage (#5127)

The GitHub ribbon is also revived.

Related issue: #5125

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
This commit is contained in:
Zsolt Borbély
2024-02-07 06:07:21 +01:00
committed by GitHub
parent d0671c4ff1
commit 9192b862c9
14 changed files with 2732 additions and 3647 deletions
+7 -7
View File
@@ -14,7 +14,7 @@ permalink: /ext-reference-autorelease/
**Summary**
Macro for `const jerry_value_t` for which jerry_release_value() is
Macro for `const jerry_value_t` for which jerry_value_free() is
automatically called when the variable goes out of scope.
*Note*: The macro depends on compiler support. For GCC and LLVM/clang, the macro is implemented
@@ -31,23 +31,23 @@ using the `__cleanup__` variable attribute. For other compilers, no support has
static void
foo (bool enable)
{
JERRYX_AR_VALUE_T bar = jerry_create_string ((const jerry_char_t *) "...");
JERRYX_AR_VALUE_T bar = jerry_string_sz ("...");
if (enable)
{
JERRYX_AR_VALUE_T baz = jerry_get_global_object ();
JERRYX_AR_VALUE_T baz = jerry_current_realm ();
/* bar and baz can now be used. */
/*
* jerry_release_value (baz) and jerry_release_value (bar) is called automatically before
* jerry_value_free (baz) and jerry_value_free (bar) is called automatically before
* returning, because `baz` and `bar` go out of scope.
*/
return;
}
/*
* jerry_release_value (bar) is called automatically when the function returns,
* jerry_value_free (bar) is called automatically when the function returns,
* because `bar` goes out of scope.
*/
}
@@ -56,5 +56,5 @@ foo (bool enable)
**See also**
- [jerry_value_t](../api-reference#jerry_value_t)
- [jerry_acquire_value](../api-reference#jerry_acquire_value)
- [jerry_release_value](../api-reference#jerry_release_value)
- [jerry_value_copy](../api-reference#jerry_value_copy)
- [jerry_value_free](../api-reference#jerry_value_free)