gettext
84044b5f - xgettext: Allow plural extraction from a single argument function

Commit
10 years ago
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.
Author
Committer
Parents
Loading