@@ -57,7 +57,7 @@ static jerry_flag_t jerry_flags;
57
57
*/
58
58
static bool jerry_api_available;
59
59
60
- /* * \addtogroup jerry Jerry engine extension interface
60
+ /* * \addtogroup jerry_extension Jerry engine extension interface
61
61
* @{
62
62
*/
63
63
@@ -67,9 +67,21 @@ static bool jerry_api_available;
67
67
char jerry_extension_characters_buffer[CONFIG_EXTENSION_CHAR_BUFFER_SIZE];
68
68
69
69
#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
+ */
70
78
int jerry_debug_level = 0 ;
79
+
80
+ /* *
81
+ * File, used for logging
82
+ */
71
83
FILE *jerry_log_file = NULL ;
72
- #endif
84
+ #endif /* JERRY_ENABLE_LOG */
73
85
74
86
/* *
75
87
* Assert that it is correct to call API in current state.
@@ -84,9 +96,8 @@ FILE *jerry_log_file = NULL;
84
96
* If it is correct, procedure just returns; otherwise - engine is stopped.
85
97
*
86
98
* 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.
90
101
*/
91
102
static void
92
103
jerry_assert_api_available (void )
@@ -126,8 +137,8 @@ jerry_make_api_unavailable (void)
126
137
static void
127
138
jerry_api_convert_ecma_value_to_api_value (jerry_api_value_t *out_value_p, /* *< out: api value */
128
139
ecma_value_t value) /* *< ecma-value (undefined,
129
- * null, boolean, number,
130
- * string or object */
140
+ * null, boolean, number,
141
+ * string or object */
131
142
{
132
143
jerry_assert_api_available ();
133
144
@@ -425,7 +436,9 @@ jerry_api_create_object (void)
425
436
* @return pointer to created error object
426
437
*/
427
438
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 */
429
442
{
430
443
jerry_assert_api_available ();
431
444
@@ -488,7 +501,7 @@ jerry_api_create_error (jerry_api_error_t error_type, const char *message_p)
488
501
489
502
return error_object_p;
490
503
}
491
- }
504
+ } /* jerry_api_create_error */
492
505
493
506
/* *
494
507
* Create an external function object
@@ -1123,7 +1136,7 @@ jerry_init (jerry_flag_t flags) /**< combination of Jerry flags */
1123
1136
{
1124
1137
#ifndef JERRY_ENABLE_LOG
1125
1138
JERRY_WARNING_MSG (" Ignoring log options because of '!JERRY_ENABLE_LOG' build configuration.\n " );
1126
- #endif
1139
+ #endif /* !JERRY_ENABLE_LOG */
1127
1140
}
1128
1141
1129
1142
if (flags & (JERRY_FLAG_MEM_STATS))
0 commit comments