zig icon indicating copy to clipboard operation
zig copied to clipboard

std: Replace use of stage1 function pointers

Open ominitay opened this issue 3 years ago • 3 comments

Many parts of std still use stage1-style function pointers. This PR removes all instances of this, replacing them with the use of std.meta.FnPtr. Additionally, manually-written if statements have been replaced with FnPtr for clarity, conciseness, and to be guarantee detection and removal when stage1 support is removed from std.

I'll give this another check over before it's ready to merge.

ominitay avatar Sep 06 '22 16:09 ominitay

related: https://github.com/ziglang/zig/pull/12813

hazeycode avatar Sep 11 '22 17:09 hazeycode

This should be ready to merge, I'll just rebase to get the checks to run correctly.

ominitay avatar Sep 11 '22 19:09 ominitay

Looks like I missed a few function pointers for Windows, will fix them.

ominitay avatar Sep 11 '22 19:09 ominitay

Tests passing, ready to be merged.

ominitay avatar Sep 16 '22 21:09 ominitay

Found a couple of mistakes in this PR, and also a merge conflict, will get those fixed. Please merge soon!

ominitay avatar Sep 28 '22 16:09 ominitay

@andrewrk Can this be merged before it goes stale again?

ominitay avatar Sep 29 '22 14:09 ominitay