]> git.ipfire.org Git - thirdparty/gettext.git/commit
xgettext: Allow plural extraction from a single argument function
authorDaiki Ueno <ueno@gnu.org>
Tue, 28 Oct 2014 07:38:40 +0000 (16:38 +0900)
committerDaiki Ueno <ueno@gnu.org>
Thu, 30 Oct 2014 01:22:29 +0000 (10:22 +0900)
commit84044b5fe692b6f32d73ad101327dd219887936b
treee6e003b0c9d3a7175f9e94955882768c12340f9a
parentdabc935fecfa16774d9930b392ef913a465b714b
xgettext: Allow plural extraction from a single argument function

The commit 8137d2b4 was a wrong fix since both singular/plural
msgids may point to the same address for Qt4 plural forms.  This
reverts the commit and fix the original double-free problem in the
right way.  Thanks to Jesper Fehrlund for suggestions.
* gettext-tools/src/xgettext.c (arglist_parser_remember_literal):
Don't ignore plural argument even if ARGNUM1 equals to ARGNUM2.
(arglist_parser_done): Make a copy of best_cp->msgid_plural when
passing it to remember_a_message_plural, if it equals to
best_cp->msgid.  Also move code conversion logic earlier taking into
account of the ownership transfer of best_cp->msgid.
* gettext-tools/src/xgettext-12: Test a single argument function.
gettext-tools/src/ChangeLog
gettext-tools/src/xgettext.c
gettext-tools/tests/ChangeLog
gettext-tools/tests/xgettext-12