On Wed, Oct 26, 2022 at 09:37:28PM +0000, drkhsh wrote:
> Totally agree that this is more correct than the way it was. Thanks. But
> maybe we can find some even cleaner solution for the upcoming 1.0 release.

In dwm it's done through a union:

        typedef union {
                int i;
                unsigned int ui;
                float f;
                const void *v;
        } Arg;

I was thinking of doing something similar but then I noticed that
slstatus doesn't pass any integer or floats, only strings. So I went
with `const char *`.

If there's plans of having functions which might accept integers/floats
or any other types in the future then using a union similar to dwm might
be worth it.

- NRK

Reply via email to