Skip to content

Commit

Permalink
S_querylocale_2008_i: Add caller's line# param
Browse files Browse the repository at this point in the history
This will be helpful in debugging
  • Loading branch information
khwilliamson committed May 6, 2023
1 parent bd49526 commit ed23bbe
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion embed.fnc
Expand Up @@ -4423,7 +4423,8 @@ S |bool |bool_setlocale_2008_i \
|NN const char *new_locale \
|const line_t line
S |const char *|querylocale_2008_i \
|const unsigned int index
|const unsigned int index \
|const line_t line
S |const char *|setlocale_from_aggregate_LC_ALL \
|NN const char *locale \
|const line_t line
Expand Down
2 changes: 1 addition & 1 deletion embed.h
Expand Up @@ -1306,7 +1306,7 @@
# endif
# if defined(USE_POSIX_2008_LOCALE)
# define bool_setlocale_2008_i(a,b,c) S_bool_setlocale_2008_i(aTHX_ a,b,c)
# define querylocale_2008_i(a) S_querylocale_2008_i(aTHX_ a)
# define querylocale_2008_i(a,b) S_querylocale_2008_i(aTHX_ a,b)
# define setlocale_from_aggregate_LC_ALL(a,b) S_setlocale_from_aggregate_LC_ALL(aTHX_ a,b)
# define use_curlocale_scratch() S_use_curlocale_scratch(aTHX)
# if !defined(USE_QUERYLOCALE)
Expand Down
4 changes: 2 additions & 2 deletions locale.c
Expand Up @@ -1656,12 +1656,12 @@ S_less_dicey_bool_setlocale_r(pTHX_ const int cat, const char * locale)
# include <libintl.h>
# endif

# define querylocale_i(i) querylocale_2008_i(i)
# define querylocale_i(i) querylocale_2008_i(i, __LINE__)
# define querylocale_c(cat) querylocale_i(cat##_INDEX_)
# define querylocale_r(cat) querylocale_i(get_category_index(cat))

STATIC const char *
S_querylocale_2008_i(pTHX_ const unsigned int index)
S_querylocale_2008_i(pTHX_ const unsigned int index, const line_t caller_line)
{
PERL_ARGS_ASSERT_QUERYLOCALE_2008_I;
assert(index <= LC_ALL_INDEX_);
Expand Down
2 changes: 1 addition & 1 deletion proto.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ed23bbe

Please sign in to comment.