Am 19. Juni 2025 um 20:51 schrieb "Bruno Haible": > Markus Mützel wrote: > > > [1] https://lists.gnu.org/archive/html/bug-gettext/2023-07/msg00003.html > > > [2] https://lists.gnu.org/archive/html/bug-gnulib/2023-11/msg00148.html > > > > > > Thank you for the quick reply and for these pointers. > > > > Just to clarify: You were writing that dcgettext will return either the > > second > > argument, or a string that has indefinite extent. > > Yes. > > > If I understand correctly, the second argument runs out of scope when the > > function returns. Is that true? > > Yes, but that is irrelevant since that second argument is not the return > value.
In the case that dcgettext returns the second argument, it would be assigned to "translation". Wouldn't that mean that a pointer to an "object" that would be out of scope would be returned from the function in that case? Markus