Fix minor implementation issues found in the JerryScript API.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
+18
-14
@@ -379,7 +379,8 @@ jerry_run_simple (const jerry_char_t *script_source,
|
||||
|
||||
**Summary**
|
||||
|
||||
Parse specified script to execute in Global scope.
|
||||
Parse script and construct an EcmaScript function. The
|
||||
lexical environment is set to the global lexical environment.
|
||||
|
||||
*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it
|
||||
is no longer needed.
|
||||
@@ -425,7 +426,7 @@ jerry_parse (const jerry_char_t *source_p,
|
||||
|
||||
**Summary**
|
||||
|
||||
Run code in Global scope.
|
||||
Run an EcmaScript function created by jerry_parse.
|
||||
|
||||
*Note*: The code should be previously parsed with `jerry_parse`.
|
||||
|
||||
@@ -1102,7 +1103,7 @@ jerry_get_number_value (const jerry_value_t value);
|
||||
|
||||
**Summary**
|
||||
|
||||
Get the size of a string. Returns zero, if the specified string is not a value.
|
||||
Get the size of a string. Returns zero, if the value parameter is not a string.
|
||||
|
||||
**Prototype**
|
||||
|
||||
@@ -1138,7 +1139,7 @@ jerry_get_string_size (const jerry_value_t value);
|
||||
|
||||
**Summary**
|
||||
|
||||
Get the length of a string. Returns zero, if the specified string is not a value.
|
||||
Get the length of a string. Returns zero, if the value parameter is not a string.
|
||||
|
||||
**Prototype**
|
||||
|
||||
@@ -1175,10 +1176,10 @@ jerry_get_string_length (const jerry_value_t value);
|
||||
|
||||
**Summary**
|
||||
|
||||
Copy string characters to specified buffer. It is the caller's responsibility to make sure that
|
||||
the string fits in the buffer.
|
||||
|
||||
*Note*: '\0' could occur in characters.
|
||||
Copy the characters of a string into a specified buffer. The
|
||||
'\0' character could occur in character buffer. Returns 0,
|
||||
if the value parameter is not a string or the buffer is
|
||||
not large enough for the whole string.
|
||||
|
||||
**Prototype**
|
||||
|
||||
@@ -1933,7 +1934,7 @@ jerry_create_undefined (void);
|
||||
|
||||
**Summary**
|
||||
|
||||
Checks whether the object or it's prototype has the given property.
|
||||
Checks whether the object or it's prototype objects have the given property.
|
||||
|
||||
**Prototype**
|
||||
|
||||
@@ -2436,7 +2437,8 @@ jerry_free_property_descriptor_fields (const jerry_property_descriptor_t *prop_d
|
||||
|
||||
**Summary**
|
||||
|
||||
Call function specified by a function value.
|
||||
Call function specified by a function value. Error flag
|
||||
must not be set for any arguments of this function.
|
||||
|
||||
*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it
|
||||
is no longer needed.
|
||||
@@ -2492,6 +2494,7 @@ jerry_call_function (const jerry_value_t func_obj_val,
|
||||
**Summary**
|
||||
|
||||
Construct object, invoking specified function object as constructor.
|
||||
Error flag must not be set for any arguments of this function.
|
||||
|
||||
*Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it
|
||||
is no longer needed.
|
||||
@@ -2704,13 +2707,14 @@ jerry_get_object_native_handle (const jerry_value_t obj_val,
|
||||
|
||||
**Summary**
|
||||
|
||||
Set native handle and, optionally, free callback for the specified object
|
||||
Set native handle and an optional free callback for the specified object
|
||||
|
||||
*Note*: If native handle was already set for the object, its value is updated.
|
||||
|
||||
*Note*: If free callback is specified, it is set to be called upon specified JS-object is freed (by GC).
|
||||
Otherwise, if NULL is specified for free callback pointer, free callback is not created and, if
|
||||
a free callback was added earlier for the object, it is removed.
|
||||
*Note*: If a non-NULL free callback is specified, it will be called
|
||||
by the garbage collector when the object is freed. The free
|
||||
callback always overwrites the previous value, so passing
|
||||
a NULL value deletes the current free callback.
|
||||
|
||||
**Prototype**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user