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
+6 -6
View File
@@ -47,8 +47,8 @@ resolved using the native JerryScript module resolver `jerryx_module_native_reso
`jerryx_module_resolve()`. Native modules are registered during application startup and by calling `dlopen()` by means
of library constructors, support for which can be turned on using the `FEATURE_INIT_FINI` build flag. In the absence of
such a flag, the module registration and unregistration functions are exposed as global symbols which can be called
explicitly. Note: `FEATURE_INIT_FINI` build flag isn't supported on Windows, because Microsoft Visual C/C++ Compiler
doesn't support library constructors and destructors.
explicitly. Note: On windows, `FEATURE_INIT_FINI` build flag only supported with GNU toolchain or Microsoft Visual C/C++ Compiler
2008 and upper.
## jerryx_module_resolve
@@ -174,9 +174,9 @@ load_and_evaluate_js_file (const jerry_value_t name, jerry_value_t *result)
char *js_file_contents = NULL;
int file_size = 0;
jerry_size_t name_size = jerry_get_utf8_string_size (name);
jerry_size_t name_size = jerry_string_size (name, JERRY_ENCODING_UTF8);
jerry_char_t name_string[name_size + 1];
jerry_string_to_utf8_char_buffer (name, name_string, name_size);
jerry_string_to_buffer (name, JERRY_ENCODING_UTF8, name_string, name_size);
name_string[name_size] = 0;
FILE *js_file = fopen (name_string, "r");
@@ -215,7 +215,7 @@ canonicalize_file_path (const jerry_value_t name)
/**
* Since a file on the file system can be referred to by multiple relative paths, but only by one absolute path, the
* absolute path becomes the canonical name for the module. Thus, to establish this canonical name, we must search
* name for "./" and "../", follow symlinks, etc., then create absolute_path via jerry_create_string () and return
* name for "./" and "../", follow symlinks, etc., then create absolute_path via jerry_string () and return
* it, because it is the canonical name for this module. Thus, we avoid loading the same JavaScript file twice.
*/
@@ -281,7 +281,7 @@ loaded.
static jerry_value_t
my_module_on_resolve (void)
{
return jerry_create_external_function (very_useful_function);
return jerry_function_external (very_useful_function);
} /* my_module_on_resolve */
/* Note that there is no semicolon at the end of the next line. This is how it must be. */