Re: [hackers] [slstatus][PATCH] do not rely on obsolete feature
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
Received on Thu Oct 27 2022 - 11:55:44 CEST
This archive was generated by hypermail 2.3.0
: Thu Oct 27 2022 - 12:00:37 CEST