File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
jerry-ext/include/jerryscript-ext Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -145,8 +145,8 @@ It will be passed into jerryx_arg_t's extra_info filed.
145
145
```c
146
146
typedef struct
147
147
{
148
- jerryx_arg_round_t round:2 ; /**< rounding policy */
149
- jerryx_arg_clamp_t clamp:1 ; /**< clamping policy */
148
+ jerryx_arg_round_t round; /**< rounding policy */
149
+ jerryx_arg_clamp_t clamp; /**< clamping policy */
150
150
} jerryx_arg_int_option_t;
151
151
```
152
152
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ typedef enum
93
93
/**
94
94
* Indicates the rounding policy which will be choose to transform a integer.
95
95
*/
96
- typedef enum
96
+ typedef enum __attribute__ (( packed ))
97
97
{
98
98
JERRYX_ARG_ROUND , /**< round */
99
99
JERRYX_ARG_FLOOR , /**< floor */
@@ -103,7 +103,7 @@ typedef enum
103
103
/**
104
104
* Indicates whether it will throw error when the integer's range is out of the target type.
105
105
*/
106
- typedef enum
106
+ typedef enum __attribute__ (( packed ))
107
107
{
108
108
JERRYX_ARG_CLAMP ,/**< clamp the number when it is out of range */
109
109
JERRYX_ARG_NO_CLAMP /**< throw a range error */
@@ -113,10 +113,10 @@ typedef enum
113
113
* The structure indicates the options used to transform integer argument.
114
114
* It will be passed into jerryx_arg_t's extra_info filed.
115
115
*/
116
- typedef struct
116
+ typedef struct __attribute__(( packed ))
117
117
{
118
- jerryx_arg_round_t round : 2 ; /**< rounding policy */
119
- jerryx_arg_clamp_t clamp : 1 ; /**< clamping policy */
118
+ jerryx_arg_round_t round ; /**< rounding policy */
119
+ jerryx_arg_clamp_t clamp ; /**< clamping policy */
120
120
} jerryx_arg_int_option_t ;
121
121
122
122
#define JERRYX_STATIC_ASSERT (x , msg ) \
You can’t perform that action at this time.
0 commit comments