Skip to content

Commit 8a9633d

Browse files
Fix style in jerry-core/jerry.cpp, and doxygen titles in jerry-core/jerry.cpp and jerry-core/jerry-extension.h.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
1 parent bd9a00d commit 8a9633d

File tree

2 files changed

+24
-11
lines changed

2 files changed

+24
-11
lines changed

jerry-core/jerry-extension.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* @{
2828
*/
2929

30-
/** \addtogroup jerry Jerry engine extension interface
30+
/** \addtogroup jerry_extension Jerry engine extension interface
3131
* @{
3232
*/
3333

jerry-core/jerry.cpp

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static jerry_flag_t jerry_flags;
5757
*/
5858
static bool jerry_api_available;
5959

60-
/** \addtogroup jerry Jerry engine extension interface
60+
/** \addtogroup jerry_extension Jerry engine extension interface
6161
* @{
6262
*/
6363

@@ -67,9 +67,21 @@ static bool jerry_api_available;
6767
char jerry_extension_characters_buffer[CONFIG_EXTENSION_CHAR_BUFFER_SIZE];
6868

6969
#ifdef JERRY_ENABLE_LOG
70+
/**
71+
* TODO:
72+
* Move logging-related functionality to separate module, like jerry-log.cpp
73+
*/
74+
75+
/**
76+
* Verbosity level of logging
77+
*/
7078
int jerry_debug_level = 0;
79+
80+
/**
81+
* File, used for logging
82+
*/
7183
FILE *jerry_log_file = NULL;
72-
#endif
84+
#endif /* JERRY_ENABLE_LOG */
7385

7486
/**
7587
* Assert that it is correct to call API in current state.
@@ -84,9 +96,8 @@ FILE *jerry_log_file = NULL;
8496
* If it is correct, procedure just returns; otherwise - engine is stopped.
8597
*
8698
* Note:
87-
* TODO: Add states when API could not be invoked, when they would appear.
88-
* // "API could not be invoked in the following cases:"
89-
* // - ... .
99+
* API could not be invoked in the following cases:
100+
* - between enter to and return from native free callback.
90101
*/
91102
static void
92103
jerry_assert_api_available (void)
@@ -126,8 +137,8 @@ jerry_make_api_unavailable (void)
126137
static void
127138
jerry_api_convert_ecma_value_to_api_value (jerry_api_value_t *out_value_p, /**< out: api value */
128139
ecma_value_t value) /**< ecma-value (undefined,
129-
* null, boolean, number,
130-
* string or object */
140+
* null, boolean, number,
141+
* string or object */
131142
{
132143
jerry_assert_api_available ();
133144

@@ -425,7 +436,9 @@ jerry_api_create_object (void)
425436
* @return pointer to created error object
426437
*/
427438
jerry_api_object_t*
428-
jerry_api_create_error (jerry_api_error_t error_type, const char *message_p)
439+
jerry_api_create_error (jerry_api_error_t error_type, /**< type of error */
440+
const char *message_p) /**< value of 'message' property
441+
* of constructed error object */
429442
{
430443
jerry_assert_api_available ();
431444

@@ -488,7 +501,7 @@ jerry_api_create_error (jerry_api_error_t error_type, const char *message_p)
488501

489502
return error_object_p;
490503
}
491-
}
504+
} /* jerry_api_create_error */
492505

493506
/**
494507
* Create an external function object
@@ -1123,7 +1136,7 @@ jerry_init (jerry_flag_t flags) /**< combination of Jerry flags */
11231136
{
11241137
#ifndef JERRY_ENABLE_LOG
11251138
JERRY_WARNING_MSG ("Ignoring log options because of '!JERRY_ENABLE_LOG' build configuration.\n");
1126-
#endif
1139+
#endif /* !JERRY_ENABLE_LOG */
11271140
}
11281141

11291142
if (flags & (JERRY_FLAG_MEM_STATS))

0 commit comments

Comments
 (0)