Hello,
I'm wondering if zig has a way of defining a function that matches the type of a previously defined function type. In C I would use a macro for this that accepts the name of the function and the macro generates the rest of the signature:
#define UPDATE_AND_RENDER(NAME) void NAME(game_memory *Memory)
typedef UPDATE_AND_RENDER(update_and_render);
UPDATE_AND_RENDER(UpdateAndRenderStub)
{
(void) Memory;
}
How would I do something like this in Zig?