- changed status to open
- removed comment
Declare cctkGH as "const cGH*"
cctkGH is declared as "const cGH" in several places, but DECLARE_CCTK_ARGUMENTS still declares it only as "cGH". This should be changed.
I checked, and some thorns need updating to deal with this. I propose to make this change after the release.
Keyword:
Comments (7)
-
reporter -
- removed comment
I have no objections to such a change. There is nothing to review in the ticket though.
-
reporter - removed comment
This is a one-line change in GridFuncStuff.pl, line 912, adding the respective "const" declaration.
Unfortunately, this change creates a lot of fallout. Many infrastructure thorns (driver, coordinates, I/O) change cctkGH, and would all have to cast away this const declaration. I'm not sure this is worth the effort.
Also, since this casting-away is legal in this case, compilers cannot use this const declaration to optimize code. (I did not know this before.)
-
- removed comment
Should this be closed as "wontfix"? In theory, making things safer for application thorns would be worth adding a bit of complexity to infrastructure thorns, but if it's too much work, then we can just leave it as is.
-
reporter - removed comment
The long-term fix would be to encapsulate the cctkGH fields properly so that they don't have to be set explicitly. I'm leaning towards leaving this as "won't fix".
-
- changed status to resolved
- removed comment
-
- edited description
- changed status to closed
- Log in to comment