You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a newer version of the header file one of the defines is missing. Let's say the second define is missing. So the inc-file would be updated to:
const
SDL_DEFINE1 = 0;
SDL_DEFINE3 = 2;
However, this raises (at least) two problems.
The define is (obviously) missing if someone is using an older version of sdl2 instead of the particualrly one to which the inc-file got updated.
The second concern is raised particularly because we are not always updating consistently to one particular version AND not all files at the same time: Let's say some files are not updated yet (very old version), some are updated (not the most recent version), some are updated to the latest version of sdl2. If now in the newest version some defines are deleted because they are gone, this may conflict with functions or expectations which are present in very old or older versions as they need or at least expect these defines/functions to be present.
The example above can be extended to structs/records where in newer version fields are missing or change their variable type.
Solution:
Actually, I don't know a simple solution yet. except to have some conditional compilation. Something like:
Keep everything as updated as possible. If SDL2 removes something, we remove it as well. Leave it to users to upgrade or downgrade the Pascal units as needed.
As you proposed - keep old stuff around, but guarded by some IFDEF block. Add a section to the README to tell users what's going on and how to enable deprecated identifiers.
This issue is about a problem I ran into recently and saw also in a pull request recently.
Simple example:
Lets say there are some defines which are translated.
In a newer version of the header file one of the defines is missing. Let's say the second define is missing. So the inc-file would be updated to:
However, this raises (at least) two problems.
The example above can be extended to structs/records where in newer version fields are missing or change their variable type.
Solution:
Actually, I don't know a simple solution yet. except to have some conditional compilation. Something like:
What are better solutions or should this be adressed anyway?
Best regards
Matthias
The text was updated successfully, but these errors were encountered: