You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now function parameters can be defined to be union_pointer in unionpointers.json and this would make their alignment align(1). This should also be added to constants as functions taking these constants don't currently except all of the variants. Not all constants variants are generated as the alignment is invalid for align(2) pointers. I am referencing IDC_* and IDI_* constants primarily.
Example
The following example isn't implemented in the current generation but could fix some problems of missing constants and usability. Suppose a user would want to load a cursor in the wide unicode format. They can only load the default IDC_ARROW constant as that is the only constant that is able to be loaded without align(1).
However, the user cannot load any other cursor as they are not generated. The change would be to mark lpCursorName param in LoadCursorW as a union pointer. Then the constant IDC_HAND, and all other IDC_* constants be marked as union pointers. With the constants being loaded in and managed like the function union pointers, they can all be marked as align(1).
Right now function parameters can be defined to be
union_pointer
inunionpointers.json
and this would make their alignmentalign(1)
. This should also be added to constants as functions taking these constants don't currently except all of the variants. Not all constants variants are generated as the alignment is invalid foralign(2)
pointers. I am referencingIDC_*
andIDI_*
constants primarily.Example
The following example isn't implemented in the current generation but could fix some problems of missing constants and usability. Suppose a user would want to load a cursor in the wide unicode format. They can only load the default
IDC_ARROW
constant as that is the only constant that is able to be loaded withoutalign(1)
.However, the user cannot load any other cursor as they are not generated. The change would be to mark
lpCursorName
param inLoadCursorW
as a union pointer. Then the constantIDC_HAND
, and all otherIDC_*
constants be marked as union pointers. With the constants being loaded in and managed like the function union pointers, they can all be marked asalign(1)
.Example Generated Code
This would allow the user to use other constants like this
This would also apply to
LoadIconW
and other functions that expect aalign(1)
string. Most functions that usMakeIntResourceW
.I don't mind implementing a PR for this as I am planning to fork and do this myself for use with a library I am writing.
The text was updated successfully, but these errors were encountered: