-
Notifications
You must be signed in to change notification settings - Fork 7
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
versions vs. enums #31
Comments
I don't want to complicate ctod with a congifuration file, unless it brings significant benefits. In this case you might as well write a script to |
Yeah, I'm editing by hand now. But I'm coming to the realization that when the preprocessor is used in particular styles, handing the non-automated pieces becomes the really tedious parts. Like, in stb_image, there's a lot of uses of 0 instead of NULL. This isn't anything ctod can deal with, but it's used all over the place, and I have to edit these by hand (I can't just In general I wonder if a 2-stage tool might be the answer, one that is ctod and one that is a D front-end that knows the input came from ctod and just makes all the final adjustments. |
I think there are many cases where ctod can deal with that. I added it for assignments in: ee21019 Assigning 0 to pointer parameters is harder, since the function type must be known inside the file.
Perhaps dmd can be hacked to have |
In the project I'm working on (raylib), many #defines are specified in a config.h file, and many are specified by the makefile. Some way to distinguish between them would be helpful:
e.g.:
I'd like some option of translation for these. Some I want to be version statements, some I want to be enums/static if:
I'm not sure how to envision this. Maybe a configuration file for ctod? I'm not sure if there would be a way to infer the right usage from the existing file. Especially since a lot of the config options are commented out in the config file, so ctod won't even see how they are defined.
The text was updated successfully, but these errors were encountered: