Skip to content

Commit 44014ce

Browse files
committed
Inline small functions
1 parent 0298783 commit 44014ce

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/isal/isal_shared.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static const uint32_t LEVEL_BUF_SIZES[24] = {
8282
ISAL_DEF_LVL3_EXTRA_LARGE
8383
};
8484

85-
static int mem_level_to_bufsize(int compression_level, int mem_level,
85+
static inline int mem_level_to_bufsize(int compression_level, int mem_level,
8686
uint32_t * bufsize)
8787
{
8888
if (compression_level < 0 || compression_level > 3 || mem_level < MEM_LEVEL_DEFAULT || mem_level > MEM_LEVEL_EXTRA_LARGE) {
@@ -135,7 +135,7 @@ static void isal_inflate_error(int err){
135135
* @param state An inflate_state
136136
* @return size_t
137137
*/
138-
static size_t bitbuffer_size(struct inflate_state *state){
138+
static inline size_t bitbuffer_size(struct inflate_state *state){
139139
return state->read_in_length / 8;
140140
}
141141

@@ -162,7 +162,7 @@ static int bitbuffer_copy(struct inflate_state *state, char *to, size_t n){
162162
return 0;
163163
}
164164

165-
static void
165+
static inline void
166166
arrange_input_buffer(uint32_t *avail_in, Py_ssize_t *remains)
167167
{
168168
*avail_in = (uint32_t)Py_MIN((size_t)*remains, UINT32_MAX);
@@ -208,7 +208,7 @@ arrange_output_buffer_with_maximum(uint32_t *avail_out,
208208
return length;
209209
}
210210

211-
static Py_ssize_t
211+
static inline Py_ssize_t
212212
arrange_output_buffer(uint32_t *avail_out,
213213
uint8_t **next_out,
214214
PyObject **buffer,

0 commit comments

Comments
 (0)