Skip to content

Commit

Permalink
cleanup: lib/codecs: define a typedef for codecs
Browse files Browse the repository at this point in the history
  • Loading branch information
aklomp committed Feb 28, 2024
1 parent b8a64a8 commit f477638
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/codecs.h
Expand Up @@ -57,10 +57,13 @@ base64_dec_stub BASE64_DEC_PARAMS
return -1;
}

typedef void (* base64_enc_fn) BASE64_ENC_PARAMS;
typedef int (* base64_dec_fn) BASE64_DEC_PARAMS;

struct codec
{
void (* enc) BASE64_ENC_PARAMS;
int (* dec) BASE64_DEC_PARAMS;
base64_enc_fn enc;
base64_dec_fn dec;
};

extern void codec_choose (struct codec *, int flags);

0 comments on commit f477638

Please sign in to comment.