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

chore(ext/ffi): remove dependency on stdint.h #15294

Merged
merged 6 commits into from
Jul 24, 2022

Conversation

littledivy
Copy link
Member

@littledivy littledivy commented Jul 24, 2022

Fixes #15221

Downstream issues: littledivy/deno_sdl2#53

/* Exact integral types. */

/* Signed. */
typedef signed char int8_t;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, since this prelude is already deciding that char is 8 bits, short int is 16 bits etc. and there's no 32 bit support, should these just be inlined back into the jit_trampoline.rs file?

There are probably systems where these typedefs are invalid (I presume the stdint.h's actual contents is platform dependent to handle that), but Deno probably does not have support for that anyway.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deno probably does not have support for that anyway.

Added const assertions for the assumptions made.

It'd be nice to just have an extendable prelude, updating test assertions is a pain. besides, we'll need it for Fast TypedArray params.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very good to me <3 Explicitness is very good, and if any downstream errors present at least it'll be really explicit.

@littledivy littledivy marked this pull request as ready for review July 24, 2022 07:28
@littledivy littledivy merged commit 58d1126 into denoland:main Jul 24, 2022
Officialstrike pushed a commit to Officialstrike/deno that referenced this pull request Jul 30, 2022
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

Successfully merging this pull request may close these issues.

ext/ffi panic: gen_trampoline 'stdint.h' not found
3 participants