Skip to content

Commit a5c4a86

Browse files
committed
MP3Decoder: ssize_t type is not portable, don't use it
1 parent 2f3d371 commit a5c4a86

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

shared-module/audiomp3/MP3Decoder.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static bool stream_readable(void *stream) {
4848

4949
// (near copy of mp_stream_posix_read, but with changes)
5050
// (circuitpy doesn't enable posix stream routines anyway)
51-
static ssize_t stream_read(void *stream, void *buf, size_t len) {
51+
static mp_int_t stream_read(void *stream, void *buf, size_t len) {
5252
int errcode;
5353
mp_obj_base_t *o = MP_OBJ_TO_PTR(stream);
5454
const mp_stream_p_t *stream_p = MP_OBJ_TYPE_GET_SLOT(o->type, protocol);

shared-module/audiomp3/MP3Decoder.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515

1616
typedef struct {
1717
uint8_t *buf;
18-
ssize_t size;
19-
ssize_t read_off;
20-
ssize_t write_off;
18+
mp_int_t size;
19+
mp_int_t read_off;
20+
mp_int_t write_off;
2121
} mp3_input_buffer_t;
2222

2323
typedef struct {

0 commit comments

Comments
 (0)