marlersoft / zigwin32gen

Generates Complete Zig bindings for Win32. See https://github.com/marlersoft/zigwin32 for the bindings themselves.
108 stars 17 forks source link

Update to latest Zig #23

Closed mlarouche closed 1 year ago

mlarouche commented 1 year ago

This PR fix compilation of the generator with the latest Zig version. Not all code generated has been updated but I added a zig fmt step to automate the process and also make sure that the generated files are formatted properly.

marler8997 commented 1 year ago

Thanks for doing this. Sorry to ask this but could we separate the formatting into a separate change? I'm not sure we want to format the "examples" directory since their format is based on the original C++ examples they were ported from. Formatting the other code is fine though, but still would be nice to include in a separate change.

mlarouche commented 1 year ago

@marler8997 I tried to remove as much auto formatting as possible. I'll submit a subsequent PR to only run zig fmt on the src folder.

marler8997 commented 1 year ago

I ended up making the changes myself here: https://github.com/marlersoft/zigwin32gen/pull/26 Here's the corresponding changes to the generated code: https://github.com/marlersoft/zigwin32/commit/007649ade45ffb544de3aafbb112de25064d3d92

Before making these changes, I went ahead and ran "zig fmt" with the old zig version on everything except the examples folder here: https://github.com/marlersoft/zigwin32gen/pull/25

So now zigwin32gen source should be formatted correctly for future contributions.