@@ -379,7 +379,8 @@ jerry_run_simple (const jerry_char_t *script_source,
379
379
380
380
**Summary**
381
381
382
- Parse specified script to execute in Global scope.
382
+ Parse script and construct an EcmaScript function. The
383
+ lexical environment is set to the global lexical environment.
383
384
384
385
*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it
385
386
is no longer needed.
@@ -425,7 +426,7 @@ jerry_parse (const jerry_char_t *source_p,
425
426
426
427
**Summary**
427
428
428
- Run code in Global scope .
429
+ Run an EcmaScript function created by jerry_parse .
429
430
430
431
*Note*: The code should be previously parsed with `jerry_parse`.
431
432
@@ -1102,7 +1103,7 @@ jerry_get_number_value (const jerry_value_t value);
1102
1103
1103
1104
**Summary**
1104
1105
1105
- Get the size of a string. Returns zero, if the specified string is not a value .
1106
+ Get the size of a string. Returns zero, if the value parameter is not a string .
1106
1107
1107
1108
**Prototype**
1108
1109
@@ -1138,7 +1139,7 @@ jerry_get_string_size (const jerry_value_t value);
1138
1139
1139
1140
**Summary**
1140
1141
1141
- Get the length of a string. Returns zero, if the specified string is not a value .
1142
+ Get the length of a string. Returns zero, if the value parameter is not a string .
1142
1143
1143
1144
**Prototype**
1144
1145
@@ -1175,10 +1176,10 @@ jerry_get_string_length (const jerry_value_t value);
1175
1176
1176
1177
**Summary**
1177
1178
1178
- Copy string characters to specified buffer. It is the caller's responsibility to make sure that
1179
- the string fits in the buffer.
1180
-
1181
- *Note*: '\0' could occur in characters .
1179
+ Copy the characters of a string into a specified buffer. The
1180
+ '\0' character could occur in character buffer. Returns 0,
1181
+ if the value parameter is not a string or the buffer is
1182
+ not large enough for the whole string .
1182
1183
1183
1184
**Prototype**
1184
1185
@@ -1933,7 +1934,7 @@ jerry_create_undefined (void);
1933
1934
1934
1935
**Summary**
1935
1936
1936
- Checks whether the object or it's prototype has the given property.
1937
+ Checks whether the object or it's prototype objects have the given property.
1937
1938
1938
1939
**Prototype**
1939
1940
@@ -2436,7 +2437,8 @@ jerry_free_property_descriptor_fields (const jerry_property_descriptor_t *prop_d
2436
2437
2437
2438
**Summary**
2438
2439
2439
- Call function specified by a function value.
2440
+ Call function specified by a function value. Error flag
2441
+ must not be set for any arguments of this function.
2440
2442
2441
2443
*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it
2442
2444
is no longer needed.
@@ -2492,6 +2494,7 @@ jerry_call_function (const jerry_value_t func_obj_val,
2492
2494
**Summary**
2493
2495
2494
2496
Construct object, invoking specified function object as constructor.
2497
+ Error flag must not be set for any arguments of this function.
2495
2498
2496
2499
*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it
2497
2500
is no longer needed.
@@ -2704,13 +2707,14 @@ jerry_get_object_native_handle (const jerry_value_t obj_val,
2704
2707
2705
2708
**Summary**
2706
2709
2707
- Set native handle and, optionally, free callback for the specified object
2710
+ Set native handle and an optional free callback for the specified object
2708
2711
2709
2712
*Note*: If native handle was already set for the object, its value is updated.
2710
2713
2711
- *Note*: If free callback is specified, it is set to be called upon specified JS-object is freed (by GC).
2712
- Otherwise, if NULL is specified for free callback pointer, free callback is not created and, if
2713
- a free callback was added earlier for the object, it is removed.
2714
+ *Note*: If a non-NULL free callback is specified, it will be called
2715
+ by the garbage collector when the object is freed. The free
2716
+ callback always overwrites the previous value, so passing
2717
+ a NULL value deletes the current free callback.
2714
2718
2715
2719
**Prototype**
2716
2720
0 commit comments