Skip to content

Commit

Permalink
Removed inlines from C code.
Browse files Browse the repository at this point in the history
  • Loading branch information
stesla committed Jun 29, 2007
1 parent c9451c8 commit 1b49398
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ext/decoder.c
Expand Up @@ -21,7 +21,7 @@

#include "ruby.h"

static inline uint8_t
static uint8_t
decode_bits (const uint8_t bits)
{
uint8_t table[] = {
Expand Down
2 changes: 1 addition & 1 deletion ext/decoder.h
Expand Up @@ -24,7 +24,7 @@

#include <stdlib.h>

inline size_t base32_decoder_buffer_size (const size_t encodedTextLength);
size_t base32_decoder_buffer_size (const size_t encodedTextLength);

size_t base32_decode (uint8_t *output, const size_t outputLength,
const uint8_t *input, const size_t inputLength);
Expand Down
6 changes: 3 additions & 3 deletions ext/encoder.c
Expand Up @@ -21,20 +21,20 @@

#include "encoder.h"

inline size_t base32_encoder_last_quintent (const size_t bytes)
size_t base32_encoder_last_quintent (const size_t bytes)
{
int quintets = bytes * 8 / 5;
int remainder = bytes % 5;
return remainder == 0 ? quintets : quintets + 1;
}

inline size_t base32_encoder_output_padding_size (const size_t bytes)
size_t base32_encoder_output_padding_size (const size_t bytes)
{
unsigned remainder = bytes % 5;
return remainder == 0 ? 0 : (5 - remainder) * 8 / 5;
}

inline size_t base32_encoder_buffer_size (const size_t bytes)
size_t base32_encoder_buffer_size (const size_t bytes)
{
return base32_encoder_last_quintent (bytes) +
base32_encoder_output_padding_size (bytes);
Expand Down

0 comments on commit 1b49398

Please sign in to comment.