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

Adds custom_const_pointer_type and custom_mut_pointer_type options. #2708

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

remexre
Copy link

@remexre remexre commented Jan 5, 2024

These options allow specifying an alternate type to use where pointer types would otherwise be used. This is useful for binding to a WebAssembly guest, as well as for certain kinds of serialization and deserialization.

Resolves #2023.

r? @emilio

These options allow specifying an alternate type to use where pointer
types would otherwise be used. This is useful for binding to a
WebAssembly guest, as well as for certain kinds of serialization and
deserialization.

Resolves rust-lang#2023.
@@ -352,4 +352,30 @@ pub(crate) mod ast_ty {
})
.collect()
}

pub(crate) fn to_ptr(
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a quick doc since ToPtr (which had them) was removed?

bindgen/codegen/helpers.rs Show resolved Hide resolved
Copy link
Contributor

@emilio emilio left a comment

Choose a reason for hiding this comment

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

This looks reasonable, but needs a test.

bindgen/codegen/helpers.rs Show resolved Hide resolved
@bors-servo
Copy link

☔ The latest upstream changes (presumably b5a6813) made this pull request unmergeable. Please resolve the merge conflicts.

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.

Feature request: Customize pointer types
4 participants