Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typedefs in picom use suffix _t which is reserved by POSIX #1234

Open
yshui opened this issue Apr 7, 2024 · 0 comments
Open

typedefs in picom use suffix _t which is reserved by POSIX #1234

yshui opened this issue Apr 7, 2024 · 0 comments

Comments

@yshui
Copy link
Owner

yshui commented Apr 7, 2024

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant