Fix style

This commit is contained in:
Evgeny Gavrin
2015-06-26 20:05:36 +03:00
parent 9b2663a889
commit 772d72c073
6 changed files with 189 additions and 194 deletions
+146 -147
View File
@@ -23,15 +23,7 @@ jerry_run_simple (const char * script_source,
- `script_source` - source code;
- `script_source_size` - size of source code buffer, in bytes;
- returned value - completion code that indicates whether run performed successfully (`JERRY_COMPLETION_CODE_OK`), or an unhandled JavaScript exception occurred (`JERRY_COMPLETION_CODE_UNHANDLED_EXCEPTION`).
**See also**
- [jerry_init](#jerryinit)
- [jerry_cleanup](#jerrycleanup)
- [jerry_parse](#jerryparse)
- [jerry_run](#jerryrun)
- returned value - completion code that indicates whether run was performed successfully (`JERRY_COMPLETION_CODE_OK`), or an unhandled JavaScript exception occurred (`JERRY_COMPLETION_CODE_UNHANDLED_EXCEPTION`).
**Example**
@@ -43,6 +35,13 @@ jerry_run_simple (const char * script_source,
}
{% endhighlight %}
**See also**
- [jerry_init](#jerryinit)
- [jerry_cleanup](#jerrycleanup)
- [jerry_parse](#jerryparse)
- [jerry_run](#jerryrun)
# jerry_init
**Summary**
@@ -63,10 +62,6 @@ jerry_init (jerry_flag_t flags);
- `JERRY_FLAG_SHOW_OPCODES` - print compiled byte-code;
- `JERRY_FLAG_EMPTY` - no flags, just initialize in default configuration.
**See also**
- [jerry_cleanup](#jerrycleanup)
**Example**
{% highlight cpp %}
@@ -79,6 +74,10 @@ jerry_init (jerry_flag_t flags);
}
{% endhighlight %}
**See also**
- [jerry_cleanup](#jerrycleanup)
# jerry_cleanup
**Summary**
@@ -115,10 +114,6 @@ jerry_parse (const char* source_p, size_t source_size);
- `source_p` - string, containing source code to parse;
- `source_size` - size of the string, in bytes.
**See also**
- [jerry_run](#jerryrun)
**Example**
{% highlight cpp %}
@@ -134,6 +129,10 @@ jerry_parse (const char* source_p, size_t source_size);
}
{% endhighlight %}
**See also**
- [jerry_run](#jerryrun)
# jerry_run
**Summary**
@@ -150,10 +149,6 @@ jerry_run (void);
- returned value - completion code that indicates whether run performed successfully (`JERRY_COMPLETION_CODE_OK`), or an unhandled JavaScript exception occurred (`JERRY_COMPLETION_CODE_UNHANDLED_EXCEPTION`).
**See also**
- [jerry_parse](#jerryparse)
**Example**
{% highlight cpp %}
@@ -169,10 +164,14 @@ jerry_run (void);
}
{% endhighlight %}
**See also**
- [jerry_parse](#jerryparse)
# jerry_api_value_t
**Summary**
The data type represents any JavaScript value that can be sent to / received from the engine.
The data type represents any JavaScript value that can be sent to or received from the engine.
Type of value is identified by `jerry_api_value_t::type`, and can be one of the following:
@@ -238,12 +237,6 @@ jerry_api_eval (const char * source_p,
- `retval_p` - value, returned by `eval` (output parameter);
- returned value - completion code that indicates whether run performed successfully (`JERRY_COMPLETION_CODE_OK`), or an unhandled JavaScript exception occurred (`JERRY_COMPLETION_CODE_UNHANDLED_EXCEPTION`).
**See also**
- [jerry_api_value_t](#jerryapivaluet)
- [jerry_api_create_external_function](#jerryapicreateexternalfunction)
- [jerry_external_handler_t](#jerryexternalhandlert)
**Example**
{% highlight cpp %}
@@ -257,6 +250,12 @@ jerry_api_eval (const char * source_p,
}
{% endhighlight %}
**See also**
- [jerry_api_value_t](#jerryapivaluet)
- [jerry_api_create_external_function](#jerryapicreateexternalfunction)
- [jerry_external_handler_t](#jerryexternalhandlert)
# jerry_api_create_string
**Summary**
@@ -274,12 +273,6 @@ jerry_api_create_string (const char * v);
- `v` - value of string to create;
- returned value is pointer to created string.
**See also**
- [jerry_api_acquire_string](#jerryapiacquirestring)
- [jerry_api_release_string](#jerryapireleasestring)
- [jerry_api_string_to_char_buffer](#jerryapistringtocharbuffer)
**Example**
{% highlight cpp %}
@@ -292,6 +285,12 @@ jerry_api_create_string (const char * v);
}
{% endhighlight %}
**See also**
- [jerry_api_acquire_string](#jerryapiacquirestring)
- [jerry_api_release_string](#jerryapireleasestring)
- [jerry_api_string_to_char_buffer](#jerryapistringtocharbuffer)
# jerry_api_string_to_char_buffer
**Summary**
@@ -310,13 +309,8 @@ jerry_api_string_to_char_buffer (const jerry_api_string_t * string_p,
- `buffer_p` - pointer to output buffer (can be NULL, is `buffer_size` is 0);
- `buffer_size` - size of the buffer;
- returned value:
- number of bytes, actually copied to the buffer - if characters were copied successfully;
- otherwise (in case size of buffer is insuficcient) - negative number, which is calculated as negation of buffer size, that is required to hold characters.
**See also**
- [jerry_api_create_string](#jerryapicreatestring)
- [jerry_api_value_t](#jerryapivaluet)
- number of bytes, actually copied to the buffer - if characters were copied successfully;
- otherwise (in case size of buffer is insuficcient) - negative number, which is calculated as negation of buffer size, that is required to hold characters.
**Example**
@@ -356,6 +350,11 @@ jerry_api_string_to_char_buffer (const jerry_api_string_t * string_p,
}
{% endhighlight %}
**See also**
- [jerry_api_create_string](#jerryapicreatestring)
- [jerry_api_value_t](#jerryapivaluet)
# jerry_api_acquire_string
**Summary**
@@ -373,11 +372,6 @@ jerry_api_acquire_string (jerry_api_string_t * string_p);
- `string_p` - pointer to the string;
- returned value - new pointer to the string.
**See also**
- [jerry_api_release_string](#jerryapireleasestring)
- [jerry_api_create_string](#jerryapicreatestring)
**Example**
{% highlight cpp %}
@@ -395,6 +389,11 @@ jerry_api_acquire_string (jerry_api_string_t * string_p);
}
{% endhighlight %}
**See also**
- [jerry_api_release_string](#jerryapireleasestring)
- [jerry_api_create_string](#jerryapicreatestring)
# jerry_api_release_string
**Summary**
@@ -409,11 +408,6 @@ jerry_api_release_string (jerry_api_string_t * string_p);
- `string_p` - pointer to the string.
**See also**
- [jerry_api_acquire_string](#jerryapiacquirestring)
- [jerry_api_create_string](#jerryapicreatestring)
**Example**
{% highlight cpp %}
@@ -431,6 +425,11 @@ jerry_api_release_string (jerry_api_string_t * string_p);
}
{% endhighlight %}
**See also**
- [jerry_api_acquire_string](#jerryapiacquirestring)
- [jerry_api_create_string](#jerryapicreatestring)
# jerry_api_create_object
**Summary**
@@ -446,19 +445,7 @@ jerry_api_create_object (const char * v);
{% endhighlight %}
- `v` - value of object to create;
- returned value is pointer to created object.
**See also**
- [jerry_api_acquire_object](#jerryapiacquireobject)
- [jerry_api_release_object](#jerryapireleaseobject)
- [jerry_api_add_object_field](#jerryapiaddobjectfield)
- [jerry_api_delete_object_field](#jerryapideleteobjectfield)
- [jerry_api_get_object_field_value](#jerryapigetobjectfieldvalue)
- [jerry_api_set_object_field_value](#jerryapisetobjectfieldvalue)
- [jerry_api_get_object_native_handle](#jerryapigetobjectnativehandle)
- [jerry_api_set_object_native_handle](#jerryapisetobjectnativehandle)
- returned value is pointer to the created object.
**Example**
@@ -472,6 +459,17 @@ jerry_api_create_object (const char * v);
}
{% endhighlight %}
**See also**
- [jerry_api_acquire_object](#jerryapiacquireobject)
- [jerry_api_release_object](#jerryapireleaseobject)
- [jerry_api_add_object_field](#jerryapiaddobjectfield)
- [jerry_api_delete_object_field](#jerryapideleteobjectfield)
- [jerry_api_get_object_field_value](#jerryapigetobjectfieldvalue)
- [jerry_api_set_object_field_value](#jerryapisetobjectfieldvalue)
- [jerry_api_get_object_native_handle](#jerryapigetobjectnativehandle)
- [jerry_api_set_object_native_handle](#jerryapisetobjectnativehandle)
# jerry_api_acquire_object
**Summary**
@@ -489,11 +487,6 @@ jerry_api_acquire_object (jerry_api_object_t * object_p);
- `object_p` - pointer to the object;
- returned value - new pointer to the object.
**See also**
- [jerry_api_release_object](#jerryapireleaseobject)
- [jerry_api_create_object](#jerryapicreateobject)
**Example**
{% highlight cpp %}
@@ -511,6 +504,11 @@ jerry_api_acquire_object (jerry_api_object_t * object_p);
}
{% endhighlight %}
**See also**
- [jerry_api_release_object](#jerryapireleaseobject)
- [jerry_api_create_object](#jerryapicreateobject)
# jerry_api_release_object
**Summary**
@@ -525,11 +523,6 @@ jerry_api_release_object (jerry_api_object_t * object_p);
- `object_p` - pointer to the object.
**See also**
- [jerry_api_acquire_object](#jerryapiacquireobject)
- [jerry_api_create_object](#jerryapicreateobject)
**Example**
{% highlight cpp %}
@@ -547,6 +540,11 @@ jerry_api_release_object (jerry_api_object_t * object_p);
}
{% endhighlight %}
**See also**
- [jerry_api_acquire_object](#jerryapiacquireobject)
- [jerry_api_create_object](#jerryapicreateobject)
# jerry_api_get_global
**Summary**
@@ -563,14 +561,6 @@ jerry_api_get_global (void);
Received pointer should be released with [jerry_api_release_object](#jerryapireleaseobject), just when the value becomes unnecessary.
**See also**
- [jerry_api_release_object](#jerryapireleaseobject)
- [jerry_api_add_object_field](#jerryapiaddobjectfield)
- [jerry_api_delete_object_field](#jerryapideleteobjectfield)
- [jerry_api_get_object_field_value](#jerryapigetobjectfieldvalue)
- [jerry_api_set_object_field_value](#jerryapisetobjectfieldvalue)
**Example**
{% highlight cpp %}
@@ -590,6 +580,14 @@ Received pointer should be released with [jerry_api_release_object](#jerryapirel
}
{% endhighlight %}
**See also**
- [jerry_api_release_object](#jerryapireleaseobject)
- [jerry_api_add_object_field](#jerryapiaddobjectfield)
- [jerry_api_delete_object_field](#jerryapideleteobjectfield)
- [jerry_api_get_object_field_value](#jerryapigetobjectfieldvalue)
- [jerry_api_set_object_field_value](#jerryapisetobjectfieldvalue)
# jerry_api_add_object_field
**Summary**
@@ -610,13 +608,8 @@ jerry_api_add_object_field (jerry_api_object_t * object_p,
- `field_value_p` - value of the field;
- `is_writable` - flag indicating whether the created field should be writable.
- returned value - true, if field was created successfully, i.e. upon the call:
- there is no field with same name in the object;
- the object is extensible.
**See also**
- [jerry_api_value_t](#jerryapivaluet)
- [jerry_api_create_object](#jerryapicreateobject)
- there is no field with same name in the object;
- the object is extensible.
**Example**
@@ -633,6 +626,12 @@ jerry_api_add_object_field (jerry_api_object_t * object_p,
}
{% endhighlight %}
**See also**
- [jerry_api_value_t](#jerryapivaluet)
- [jerry_api_create_object](#jerryapicreateobject)
# jerry_api_delete_object_field
**Summary**
@@ -649,12 +648,7 @@ jerry_api_delete_object_field (jerry_api_object_t * object_p,
- `object_p` - object to delete field at;
- `field_name_p` - name of the field.
- returned value - true, if field was deleted successfully, i.e. upon the call:
- there is field with specified name in the object.
**See also**
- [jerry_api_value_t](#jerryapivaluet)
- [jerry_api_create_object](#jerryapicreateobject)
- there is field with specified name in the object.
**Example**
@@ -667,6 +661,11 @@ jerry_api_delete_object_field (jerry_api_object_t * object_p,
}
{% endhighlight %}
**See also**
- [jerry_api_value_t](#jerryapivaluet)
- [jerry_api_create_object](#jerryapicreateobject)
# jerry_api_get_object_field_value
**Summary**
@@ -685,15 +684,10 @@ jerry_api_get_object_field_value (jerry_api_object_t * object_p,
- `field_name_p` - name of the field;
- `field_value_p` - retrieved field value (output parameter).
- returned value - true, if field value was retrieved successfully, i.e. upon the call:
- there is field with specified name in the object.
- there is field with specified name in the object.
If value was retrieved successfully, it should be freed with [jerry_api_release_object](#jerryapireleaseobject) just when it becomes unnecessary.
**See also**
- [jerry_api_value_t](#jerryapivaluet)
- [jerry_api_create_object](#jerryapicreateobject)
**Example**
{% highlight cpp %}
@@ -712,6 +706,11 @@ If value was retrieved successfully, it should be freed with [jerry_api_release_
}
{% endhighlight %}
**See also**
- [jerry_api_value_t](#jerryapivaluet)
- [jerry_api_create_object](#jerryapicreateobject)
# jerry_api_set_object_field_value
**Summary**
@@ -730,12 +729,7 @@ jerry_api_set_object_field_value (jerry_api_object_t * object_p,
- `field_name_p` - name of the field;
- `field_value_p` - field value to set.
- returned value - true, if field value was set successfully, i.e. upon the call:
- field value is writable.
**See also**
- [jerry_api_value_t](#jerryapivaluet)
- [jerry_api_create_object](#jerryapicreateobject)
- field value is writable.
**Example**
@@ -750,6 +744,11 @@ jerry_api_set_object_field_value (jerry_api_object_t * object_p,
}
{% endhighlight %}
**See also**
- [jerry_api_value_t](#jerryapivaluet)
- [jerry_api_create_object](#jerryapicreateobject)
# jerry_api_get_object_native_handle
**Summary**
@@ -768,11 +767,6 @@ jerry_api_get_object_native_handle (jerry_api_object_t * object_p,
- `out_handle_p` - handle value (output parameter);
- returned value - true, if there is handle associated with the object.
**See also**
- [jerry_api_create_object](#jerryapicreateobject)
- [jerry_api_set_object_native_handle](#jerryapisetobjectnativehandle)
**Example**
{% highlight cpp %}
@@ -792,6 +786,11 @@ jerry_api_get_object_native_handle (jerry_api_object_t * object_p,
}
{% endhighlight %}
**See also**
- [jerry_api_create_object](#jerryapicreateobject)
- [jerry_api_set_object_native_handle](#jerryapisetobjectnativehandle)
# jerry_api_set_object_native_handle
**Summary**
@@ -813,11 +812,6 @@ jerry_api_set_object_native_handle (jerry_api_object_t * object_p,
- `handle` - handle value;
- `freecb_p` - pointer to "free" callback or NULL (if not NULL the callback would be called upon GC of the object).
**See also**
- [jerry_api_create_object](#jerryapicreateobject)
- [jerry_api_get_object_native_handle](#jerryapigetobjectnativehandle)
**Example**
{% highlight cpp %}
@@ -837,6 +831,11 @@ jerry_api_set_object_native_handle (jerry_api_object_t * object_p,
}
{% endhighlight %}
**See also**
- [jerry_api_create_object](#jerryapicreateobject)
- [jerry_api_get_object_native_handle](#jerryapigetobjectnativehandle)
# jerry_api_is_function
**Summary**
@@ -852,12 +851,6 @@ jerry_api_is_function (const jerry_api_object_t* object_p);
- `object_p` - object to check;
- returned value - just boolean, indicating whether the specified object can be called as function.
**See also**
- [jerry_api_value_t](#jerryapivaluet)
- [jerry_api_is_constructor](#jerryapiisconstructor)
- [jerry_api_call_function](#jerryapicallfunction)
**Example**
{% highlight cpp %}
@@ -874,6 +867,12 @@ jerry_api_is_function (const jerry_api_object_t* object_p);
}
{% endhighlight %}
**See also**
- [jerry_api_value_t](#jerryapivaluet)
- [jerry_api_is_constructor](#jerryapiisconstructor)
- [jerry_api_call_function](#jerryapicallfunction)
# jerry_api_is_constructor
**Summary**
@@ -889,12 +888,6 @@ jerry_api_is_constructor (const jerry_api_object_t* object_p);
- `object_p` - object to check;
- returned value - just boolean, indicating whether the specified object can be called as constructor.
**See also**
- [jerry_api_value_t](#jerryapivaluet)
- [jerry_api_is_function](#jerryapiisfunction)
- [jerry_api_construct_object](#jerryapiconstructobject)
**Example**
{% highlight cpp %}
@@ -911,6 +904,12 @@ jerry_api_is_constructor (const jerry_api_object_t* object_p);
}
{% endhighlight %}
**See also**
- [jerry_api_value_t](#jerryapivaluet)
- [jerry_api_is_function](#jerryapiisfunction)
- [jerry_api_construct_object](#jerryapiconstructobject)
# jerry_api_call_function
**Summary**
@@ -937,12 +936,6 @@ jerry_api_call_function (jerry_api_object_t * function_object_p,
If call was performed successfully, returned value should be freed with [jerry_api_release_object](#jerryapireleaseobject) just when it becomes unnecessary.
**See also**
- [jerry_api_is_function](#jerryapiisfunction)
- [jerry_api_value_t](#jerryapivaluet)
- [jerry_api_create_external_function](#jerryapicreateexternalfunction)
**Example**
{% highlight cpp %}
@@ -970,6 +963,12 @@ jerry_api_call_function (jerry_api_object_t * function_object_p,
}
{% endhighlight %}
**See also**
- [jerry_api_is_function](#jerryapiisfunction)
- [jerry_api_value_t](#jerryapivaluet)
- [jerry_api_create_external_function](#jerryapicreateexternalfunction)
# jerry_api_construct_object
**Summary**
@@ -994,11 +993,6 @@ jerry_api_construct_object (jerry_api_object_t * function_object_p,
If call was performed successfully, returned value should be freed with [jerry_api_release_object](#jerryapireleaseobject) just when it becomes unnecessary.
**See also**
- [jerry_api_is_constructor](#jerryapiisconstructor)
- [jerry_api_value_t](#jerryapivaluet)
**Example**
{% highlight cpp %}
@@ -1025,6 +1019,11 @@ If call was performed successfully, returned value should be freed with [jerry_a
}
{% endhighlight %}
**See also**
- [jerry_api_is_constructor](#jerryapiisconstructor)
- [jerry_api_value_t](#jerryapivaluet)
# jerry_external_handler_t
**Summary**
@@ -1062,13 +1061,6 @@ jerry_api_create_external_function (jerry_external_handler_t handler_p);
Received pointer should be released with [jerry_api_release_object](#jerryapireleaseobject), just when the value becomes unnecessary.
**See also**
- [jerry_external_handler_t](#jerryexternalhandlert)
- [jerry_api_is_function](#jerryapiisfunction)
- [jerry_api_call_function](#jerryapicallfunction)
- [jerry_api_release_object](#jerryapireleaseobject)
**Example**
{% highlight cpp %}
@@ -1100,3 +1092,10 @@ handler (const jerry_api_object_t * function_obj_p,
jerry_api_release_object (obj_p);
}
{% endhighlight %}
**See also**
- [jerry_external_handler_t](#jerryexternalhandlert)
- [jerry_api_is_function](#jerryapiisfunction)
- [jerry_api_call_function](#jerryapicallfunction)
- [jerry_api_release_object](#jerryapireleaseobject)