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

for enums save number and string #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dirk-zimoch
Copy link

This patch saves enums as index number and string. During restore, it tries to restore the string first. Only if that fails, it restored the index number. This can make a difference if new choices are inserted in the middle or choices are re-ordered. Examples are new breakpoint tables for the LINR field inserted in some other order than the date of implementation (e.g. alphabetically). The idea is that if the enum sorting changes, people usually want to have the old string choice restored (the user interface of enums), not the index number (the implementation).

This modification has originally been implemented by David Maden at SLS in 2005.

@timmmooney
Copy link
Contributor

I like this idea. Thanks. However, I need to modify verify.c for compatibility with this, or refactor so that verify.c
uses code in save_restore.c and dbrestore to read and write .sav files.

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

Successfully merging this pull request may close these issues.

2 participants