@@ -324,7 +324,7 @@ Flags for [jerry_exec_snapshot](#jerry_exec_snapshot) functions:
324324 - JERRY_SNAPSHOT_EXEC_COPY_DATA - copy snapshot data into memory (see below)
325325 - JERRY_SNAPSHOT_EXEC_ALLOW_STATIC - allow executing static snapshots
326326 - JERRY_SNAPSHOT_EXEC_LOAD_AS_FUNCTION - load snapshot as function instead of executing it
327- - JERRY_SNAPSHOT_EXEC_HAS_RESOURCE - `source_name` field is valid
327+ - JERRY_SNAPSHOT_EXEC_HAS_SOURCE_NAME - `source_name` field is valid
328328 in [jerry_exec_snapshot_option_values_t](#jerry_exec_snapshot_option_values_t)
329329 - JERRY_SNAPSHOT_EXEC_HAS_USER_VALUE - `user_value` field is valid
330330 in [jerry_exec_snapshot_option_values_t](#jerry_exec_snapshot_option_values_t)
@@ -560,7 +560,7 @@ typedef struct
560560 uint32_t options; /**< combination of jerry_parse_option_enable_feature_t values */
561561 jerry_value_t argument_list; /**< function argument list if JERRY_PARSE_HAS_ARGUMENT_LIST is set in options
562562 * Note: must be string value */
563- jerry_value_t source_name; /**< resource name string (usually a file name)
563+ jerry_value_t source_name; /**< source name string (usually a file name)
564564 * if JERRY_PARSE_HAS_SOURCE_NAME is set in options
565565 * Note: must be string value */
566566 uint32_t start_line; /**< start line of the source code if JERRY_PARSE_HAS_START is set in options */
@@ -626,7 +626,7 @@ Source code location data retrieved by
626626```c
627627typedef struct
628628{
629- jerry_value_t source_name; /**< resource name */
629+ jerry_value_t source_name; /**< source name */
630630 jerry_size_t line; /**< line index */
631631 jerry_size_t column; /**< column index */
632632} jerry_frame_location_t;
@@ -1398,8 +1398,8 @@ Various configuration options for [jerry_exec_snapshot](#jerry_exec_snapshot)
13981398```c
13991399typedef struct
14001400{
1401- jerry_value_t source_name; /**< resource name string (usually a file name)
1402- * if JERRY_SNAPSHOT_EXEC_HAS_RESOURCE is set in exec_snapshot_opts
1401+ jerry_value_t source_name; /**< source name string (usually a file name)
1402+ * if JERRY_SNAPSHOT_EXEC_HAS_SOURCE_NAME is set in exec_snapshot_opts
14031403 * Note: non-string values are ignored */
14041404 jerry_value_t user_value; /**< user value assigned to all functions created by this script including
14051405 * eval calls executed by the script if JERRY_SNAPSHOT_EXEC_HAS_USER_VALUE
@@ -11575,7 +11575,7 @@ main (void)
1157511575
1157611576**Summary**
1157711577
11578- Get the resource name (usually a file name) of the currently executed script or the given function object.
11578+ Get the source name (usually a file name) of the currently executed script or the given function object.
1157911579
1158011580This function is typically called from native callbacks.
1158111581
@@ -11592,17 +11592,17 @@ is no longer needed.
1159211592jerry_value_t
1159311593jerry_source_name (jerry_value_t value);
1159411594```
11595- - `value` - api value to obtain the resource name from
11595+ - `value` - api value to obtain the source name from
1159611596- return string value constructed from
11597- - the currently executed function object's resource name, if the given value is undefined
11598- - resource name of the function object, if the given value is a function object
11597+ - the currently executed function object's source name, if the given value is undefined
11598+ - source name of the function object, if the given value is a function object
1159911599 - "<anonymous>", otherwise
1160011600
1160111601*New in version 2.2*.
1160211602
1160311603**Example**
1160411604
11605- [doctest]: # (name="02.API-REFERENCE-jsresourcename .c")
11605+ [doctest]: # (name="02.API-REFERENCE-jssourcename .c")
1160611606
1160711607```c
1160811608#include <stdio.h>
@@ -11628,10 +11628,10 @@ main (void)
1162811628
1162911629 jerry_value_t global = jerry_current_realm ();
1163011630
11631- /* Register the "resourceName " method. */
11631+ /* Register the sourceName " method. */
1163211632 {
1163311633 jerry_value_t func = jerry_function_external (source_name_handler);
11634- jerry_value_t name = jerry_string_sz ("resourceName ");
11634+ jerry_value_t name = jerry_string_sz ("sourceName ");
1163511635 jerry_value_t result = jerry_object_set (global, name, func);
1163611636 jerry_value_free (result);
1163711637 jerry_value_free (name);
@@ -11640,7 +11640,7 @@ main (void)
1164011640
1164111641 jerry_value_free (global);
1164211642
11643- const jerry_char_t source[] = "function myFunction() { return resourceName () }; myFunction()";
11643+ const jerry_char_t source[] = "function myFunction() { return sourceName () }; myFunction()";
1164411644
1164511645 jerry_parse_options_t parse_options;
1164611646 parse_options.options = JERRY_PARSE_HAS_SOURCE_NAME;
0 commit comments