-
Notifications
You must be signed in to change notification settings - Fork 116
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
Expanded utility of define-c-struct
#620
Conversation
define c struct
define-c-struct
define-c-struct
define-c-struct
Looks good to me, modulo improving comments and documentation. |
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.
Looks excellent to me!
Just have to make changes to the Guide and I'll remove draft status for review. |
Nearly there.. Kind of a brain dump. Misspellings and errors likely. Going to refine the Sample. |
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.
This is excellent, i am going to merge it.
@patternspandemic sorry for the obscene delay, it fell though the cracks.
Additions to resolve issues as explained in #614.
The new form of the
define-c-struct
macro adds two optional positional arguments:The procedure's interface could be made nicer with named optionals if backward compatibility is not a priority, otherwise specifying
#f
forrelease-function
andcompatible-tags
will occur often when dealing with typedef'd structs.Specifying a list of compatible tags allows for type compatibility when a struct is aliased by a typedef of a different name:
Specifying
#t
foras-typedef
makes the macro operate on the typedef alias rather than struct type. This allows for the use ofdefine-c-struct
on typedef'd anonymous structs: