yshui / picom

A lightweight compositor for X11
Other
3.92k stars 576 forks source link

`typedef`s in picom use suffix `_t` which is reserved by POSIX #1234

Open yshui opened 2 months ago

yshui commented 2 months ago

You can find many such typedefs throughout picom, which is probably a bad idea. Because these names are reserved by POSIX

Simply dropping the _t suffix is not a good idea either, because it's difficult to tell what a name is, for example:

    image_handle *a;

This could be "multiple variable image_handle with variable a, throw away the result", or "define variable a with type image_handle*". And it's also possible to have the same name to be either a type or a variable in different parts of the codebase.

So we must come up with a naming scheme so that typedefs and variables are named differently. I would suggest CamelCase. (structs, enums are not affected by this since they aren't ambiguous).