The error return value of bindtextdomain() was not propagated to the original calling script. This implements returning FALSE when the call fails, and TRUE when it succeeds.
https://github.com/vim/vim/pull/15116
(4 files)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Build failure on macos-14
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Build failure on macos-14
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Hm, not sure what is wrong on MacOS. Perhaps change this:
if (bindtextdomain((const char *)argvars[0].vval.v_string, (const char *)argvars[1].vval.v_string) == NULL)
to
if (!bindtextdomain((const char *)argvars[0].vval.v_string, (const char *)argvars[1].vval.v_string))
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.![]()
In this case the check expands to ( == NULL), that's a problem. The macros should expand to some non-null value.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.![]()
@cvwillegen pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@k-takata commented on this pull request.
In src/testdir/test_gettext.vim:
> @@ -2,15 +2,17 @@ source check.vim
" Test for gettext()
func Test_gettext()
- call assert_fails('call bindtextdomain("test")', 'E119:')
- call assert_fails('call bindtextdomain("vim", "test")', 'E475:')
+ if has("gettext")
CheckFeature gettext might be better?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.![]()
@LemonBoy commented on this pull request.
In src/vim.h:
> @@ -598,7 +598,7 @@ extern int (*dyn_libintl_wputenv)(const wchar_t *envstring); # ifdef bindtextdomain # undef bindtextdomain # endif -# define bindtextdomain(x, y) // empty +# define bindtextdomain(x, y) (y)⬇️ Suggested change
-# define bindtextdomain(x, y) (y) +# define bindtextdomain(x, y) ""
This is better as bindtextdomain(<whatever>, NULL) does not return NULL (unless there's something wrong).
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.![]()
@cvwillegen pushed 1 commit.
You are receiving this because you are subscribed to this thread.![]()
thanks!
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.![]()