-
Notifications
You must be signed in to change notification settings - Fork 22
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
wrap_fn_ptr!
: Generate a decl_fn!
macro inside; also document macros
#580
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kkysen
force-pushed
the
kkysen/macro-enum_map_ty
branch
from
November 21, 2023 03:58
3f9a4c8
to
b72a63d
Compare
kkysen
force-pushed
the
kkysen/macro-wrap_fn_ptr-decl_fn
branch
from
November 21, 2023 03:58
6e38a36
to
fa0e67f
Compare
kkysen
force-pushed
the
kkysen/macro-enum_map_ty
branch
from
November 27, 2023 06:27
b72a63d
to
d14077c
Compare
kkysen
force-pushed
the
kkysen/macro-wrap_fn_ptr-decl_fn
branch
from
November 27, 2023 06:27
fa0e67f
to
5bda2e8
Compare
rinon
requested changes
Nov 29, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish we didn't need the decl_fn
macros at all, but this is cleaner than writing them all out since we already have all the params in the wrapper macro.
This allows us to keep names very similar to the C ones (snake_case), and it'll allow us to declare a macro inside of `wrap_fn_ptr!`.
kkysen
force-pushed
the
kkysen/macro-wrap_fn_ptr-decl_fn
branch
from
November 29, 2023 06:00
5bda2e8
to
336bb06
Compare
kkysen
changed the title
Nov 29, 2023
wrap_fn_ptr!
: Generate a decl_fn!
macro insidewrap_fn_ptr!
: Generate a decl_fn!
macro inside; also document macros
rinon
reviewed
Nov 30, 2023
rinon
approved these changes
Dec 1, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We're already matching the
fn
signature with a macro, so generating thedecl_fn!
macro inside is pretty trivial, and this way we don't have to write all of thedecl_*_fn!
macros ourselves.This also adds documentation for:
trait HasFnPtr
struct WrappedFnPtr
wrap_fn_ptr!
bd_fn!