indie-status-page/venv/lib/python3.11/site-packages/mypyc/lib-rt/base64/codecs.h
IndieStatusBot 902133edd3 feat: indie status page MVP -- FastAPI + SQLite
- 8 DB models (services, incidents, monitors, subscribers, etc.)
- Full CRUD API for services, incidents, monitors
- Public status page with live data
- Incident detail page with timeline
- API key authentication
- Uptime monitoring scheduler
- 13 tests passing
- TECHNICAL_DESIGN.md with full spec
2026-04-25 05:00:00 +00:00

57 lines
1.2 KiB
C

#include "libbase64.h"
// Function parameters for encoding functions:
#define BASE64_ENC_PARAMS \
( struct base64_state *state \
, const char *src \
, size_t srclen \
, char *out \
, size_t *outlen \
)
// Function parameters for decoding functions:
#define BASE64_DEC_PARAMS \
( struct base64_state *state \
, const char *src \
, size_t srclen \
, char *out \
, size_t *outlen \
)
// This function is used as a stub when a certain encoder is not compiled in.
// It discards the inputs and returns zero output bytes.
static inline void
base64_enc_stub BASE64_ENC_PARAMS
{
(void) state;
(void) src;
(void) srclen;
(void) out;
*outlen = 0;
}
// This function is used as a stub when a certain decoder is not compiled in.
// It discards the inputs and returns an invalid decoding result.
static inline int
base64_dec_stub BASE64_DEC_PARAMS
{
(void) state;
(void) src;
(void) srclen;
(void) out;
(void) outlen;
return -1;
}
typedef void (* base64_enc_fn) BASE64_ENC_PARAMS;
typedef int (* base64_dec_fn) BASE64_DEC_PARAMS;
struct codec
{
base64_enc_fn enc;
base64_dec_fn dec;
};
extern void codec_choose (struct codec *, int flags);