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

Eliminate encoding check in ncnmetric() #2782

Merged
merged 3 commits into from
Jun 5, 2024
Merged

Conversation

dankamongmen
Copy link
Owner

We had a grotesque pthread_once() + nl_langinfo() in ncnmetric(). The alternative would be accepting a const struct notcurses* (and breaking API). This was broken, as shown in #2779. We want to use the advanced detection mechanisms of notcurses_init() and ncdirect_init(). Enable this from those functions, then, across the continued lifetime of the process. Document this somewhat unorthodox choice and (possibly) surprising behavior in the BUGS section of notcurses_metric(3).

Use encoding_is_utf8() in ncdirect_init().

Closes #2779
Closes #2780

@dankamongmen dankamongmen merged commit b41af4e into master Jun 5, 2024
2 of 4 checks passed
@dankamongmen dankamongmen deleted the dankamongmen/ncmetric branch June 5, 2024 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant