Skip to content

Commit 9746d90

Browse files
author
Gabriel Schulhof
committed
squash: Whitespace
JerryScript-DCO-1.0-Signed-off-by: Gabriel Schulhof [email protected]
1 parent ce7a226 commit 9746d90

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

jerry-core/jcontext/jcontext.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
#define JERRY_CONTEXT_MODULE_COUNT 8
3939
#endif /* ndef JERRY_CONTEXT_MODULE_COUNT */
4040

41-
typedef struct {
41+
typedef struct
42+
{
4243
void (*deleter)(void *);
4344
void *data;
4445
} jerry_module_data_t;

jerry-core/jerry.c

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2097,8 +2097,10 @@ jerry_dispatch_object_free_callback (ecma_external_pointer_t freecb_p, /**< poin
20972097
/* This value is context-independent */
20982098
static int module_index = -1;
20992099
int
2100-
jerry_register_module(void) {
2101-
if (module_index == JERRY_CONTEXT_MODULE_COUNT - 1) {
2100+
jerry_register_module(void)
2101+
{
2102+
if (module_index == JERRY_CONTEXT_MODULE_COUNT - 1)
2103+
{
21022104
return -1;
21032105
}
21042106
return (++module_index);
@@ -2110,10 +2112,12 @@ jerry_register_module(void) {
21102112
* Returns: The module's data on success, NULL of failure.
21112113
*/
21122114
void *
2113-
jerry_get_module_data(int index) {
2115+
jerry_get_module_data(int index)
2116+
{
21142117
void *return_value = NULL;
21152118

2116-
if (index >= 0 && index < JERRY_CONTEXT_MODULE_COUNT) {
2119+
if (index >= 0 && index < JERRY_CONTEXT_MODULE_COUNT)
2120+
{
21172121
return_value = (JERRY_CONTEXT (module_data)[index]).data;
21182122
}
21192123

@@ -2124,8 +2128,10 @@ jerry_get_module_data(int index) {
21242128
* Set the module's data for the context
21252129
*/
21262130
void
2127-
jerry_set_module_data(int index, void *data, void (*deleter)(void *)) {
2128-
if (index >= 0 && index < JERRY_CONTEXT_MODULE_COUNT) {
2131+
jerry_set_module_data(int index, void *data, void (*deleter)(void *))
2132+
{
2133+
if (index >= 0 && index < JERRY_CONTEXT_MODULE_COUNT)
2134+
{
21292135
(JERRY_CONTEXT (module_data)[index]).data = data;
21302136
(JERRY_CONTEXT (module_data)[index]).deleter = deleter;
21312137
}

jerry-core/jerryscript.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,9 @@ size_t jerry_parse_and_save_literals (const jerry_char_t *source_p, size_t sourc
346346
/**
347347
* Module management
348348
*/
349-
int jerry_register_module(void);
350-
void *jerry_get_module_data(int index);
351-
void jerry_set_module_data(int index, void *data, void (*deleter)(void *));
349+
int jerry_register_module (void);
350+
void *jerry_get_module_data (int index);
351+
void jerry_set_module_data (int index, void *data, void (*deleter)(void *));
352352

353353
/**
354354
* @}

0 commit comments

Comments
 (0)