# HG changeset patch # User Mychaela Falconia # Date 1727503234 0 # Node ID 23656d874524e8b1d3d54fd5a79f01a87f5b127a # Parent 5595293e4f297a863e92f484d446d188c31d2c66 libgsmefr: add const words with struct sizes diff -r 5595293e4f29 -r 23656d874524 libgsmefr/dec_create.c --- a/libgsmefr/dec_create.c Sun Sep 22 00:36:35 2024 +0000 +++ b/libgsmefr/dec_create.c Sat Sep 28 06:00:34 2024 +0000 @@ -9,6 +9,8 @@ #include "cnst.h" #include "dec_state.h" +const unsigned EFR_decoder_state_size = sizeof(struct EFR_decoder_state); + struct EFR_decoder_state *EFR_decoder_create(void) { struct EFR_decoder_state *st; diff -r 5595293e4f29 -r 23656d874524 libgsmefr/enc_create.c --- a/libgsmefr/enc_create.c Sun Sep 22 00:36:35 2024 +0000 +++ b/libgsmefr/enc_create.c Sat Sep 28 06:00:34 2024 +0000 @@ -9,6 +9,8 @@ #include "cnst.h" #include "enc_state.h" +const unsigned EFR_encoder_state_size = sizeof(struct EFR_encoder_state); + struct EFR_encoder_state *EFR_encoder_create(int dtx) { struct EFR_encoder_state *st; diff -r 5595293e4f29 -r 23656d874524 libgsmefr/gsm_efr.h --- a/libgsmefr/gsm_efr.h Sun Sep 22 00:36:35 2024 +0000 +++ b/libgsmefr/gsm_efr.h Sat Sep 28 06:00:34 2024 +0000 @@ -55,4 +55,9 @@ extern const uint8_t EFR_decoder_homing_frame[EFR_RTP_FRAME_LEN]; +/* sizes of state structures, to support alternative malloc schemes */ + +extern const unsigned EFR_encoder_state_size; +extern const unsigned EFR_decoder_state_size; + #endif /* include guard */