[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
POSIX <libintl.h> and restrict
From: |
Bruno Haible |
Subject: |
POSIX <libintl.h> and restrict |
Date: |
Thu, 12 May 2022 01:38:15 +0200 |
https://posix.rhansen.org/p/gettext_draft
Lines 163..230, 538..543
The 'restrict' keywords in these declarations are useless and - worse -
forbid some valid, useful calls. For example, there is nothing wrong
with
dgettext("hello", "hello")
which will attempt to search for a translation of "hello" in a catalog
name hello.mo. There is also no imaginable optimization that can be done
in the implementation of dgettext() by assuming that the two arguments
were different.
'restrict' is meaningful when at least one of the parameters is a
writable pointer type. Here, all parameters are either non-pointers
or read-only pointers.
Suggestion: Remove every 'restrict' in these declarations.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- POSIX <libintl.h> and restrict,
Bruno Haible <=