Skip to content

Commit

Permalink
Fix function type declarations and definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
snacsnoc committed Apr 2, 2024
1 parent 29314a8 commit 1587e0f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/ports/bare-arm/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,12 @@ static const char *demo_complex_input =
" print('{} is odd'.format(i))";


extern void main(void) __attribute__((visibility("default")));
extern int main(void) __attribute__((visibility("default")));

void putchar(char c) { *uart = c; }
int putchar(int c) {
*uart = (uint8_t)c;
return c;
}


void print(const char *s) {
Expand Down Expand Up @@ -98,12 +101,13 @@ static void do_str(const char *src, mp_parse_input_kind_t input_kind) {


// Main entry point: initialise the runtime and execute demo strings.
void main(void) {
int main(void) {
print("Boots");
mp_init();
do_str(demo_single_input, MP_PARSE_SINGLE_INPUT);
do_str(demo_complex_input, MP_PARSE_FILE_INPUT);
mp_deinit();
return 0;
}

// Called if an exception is raised outside all C exception-catching handlers.
Expand Down

0 comments on commit 1587e0f

Please sign in to comment.