Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a cbool to ctypes.nim #24704

Open
maxpicklez opened this issue Feb 20, 2025 · 0 comments
Open

Add a cbool to ctypes.nim #24704

maxpicklez opened this issue Feb 20, 2025 · 0 comments

Comments

@maxpicklez
Copy link

Description

The ctypes.nim file does not include a definition for the bool type. Which was added in C99 and confusingly will be redefined in C23 to bool instead of uint8.

Nim Version

Nim Compiler Version 2.2.2 [Linux: amd64]
Compiled at 2025-02-06
Copyright (c) 2006-2025 by Andreas Rumpf

git hash: 6c34f62
active boot switches: -d:release

Current Output

@m..@s..@s..@[email protected]@[email protected]@snico@[email protected]:1137:17: error: conflicting types for 'emscripten_set_main_loop'
 1137 | N_NIMCALL(void, emscripten_set_main_loop)(tyProc__ln4kdL5W9bbX4a1xl8nnVXQ f, int fps, int simulate_infinite_loop);
      |                 ^
/home/gribble/src/emsdk/upstream/emscripten/cache/sysroot/include/emscripten/emscripten.h:41:6: note: previous declaration is here
   41 | void emscripten_set_main_loop(em_callback_func func, int fps, bool simulate_infinite_loop);
      |      ^

Expected Output

A working emscripten wasm page or at least continuation of the compilation process.

Known Workarounds

Revert this commit in the emsdk which reverts the type signature back to int.

Additional Information

C23 redefines bool so this may cause a different issue in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant