Skip to content

Several tidyings in the C bindings#885

Merged
alexcrichton merged 6 commits into
bytecodealliance:mainfrom
sunfishcode:sunfishcode/tidy-c-bindings
Mar 7, 2024
Merged

Several tidyings in the C bindings#885
alexcrichton merged 6 commits into
bytecodealliance:mainfrom
sunfishcode:sunfishcode/tidy-c-bindings

Conversation

@sunfishcode

Copy link
Copy Markdown
Member
  • Add several comments to the C bindings output

  • Move the #include <stdlib.h> out of the .h file and into the .c file, since it's for realloc/free etc. and those are only used in the .c file.

  • Use named structs inside of typedefs, so that the structs have names in the generated debug info.

- Add several comments to the C bindings output

- Move the `#include <stdlib.h>` out of the `.h` file and into the `.c`
  file, since it's for `realloc`/`free` etc. and those are only used in the
  `.c` file.

- Use named structs inside of typedefs, so that the structs have names
  in the generated debug info.
Comment thread crates/c/src/lib.rs Outdated

@alexcrichton alexcrichton left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looks good to me as well, just one minor question

Comment thread crates/c/src/lib.rs Outdated
@alexcrichton alexcrichton enabled auto-merge March 7, 2024 23:16
@alexcrichton alexcrichton added this pull request to the merge queue Mar 7, 2024
Merged via the queue into bytecodealliance:main with commit 046ddcb Mar 7, 2024
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.

3 participants