| 13 | } |
| 14 | |
| 15 | int main() { |
| 16 | hi_world(); |
| 17 | |
| 18 | // Also test an indirect call. Taking the function by reference makes us go |
| 19 | // through more code paths that could have bugs, like relocatable code needing |
| 20 | // to make wrapper functions for function pointers, which need signatures for |
| 21 | // an imported function from JS. |
| 22 | void (*func)(const char*) = &emscripten_console_log; |
| 23 | func("indirect import"); |
| 24 | |
| 25 | return 0; |
| 26 | } |