| To: | yyyyyyyy@xxxxxxxxxxxxx |
|---|---|
| Subject: | Bug in Work Item 1.2.2 1.2.2 Headers |
| From: | yyyyyyyyyyyyyy@xxxxxxxxxxx |
| Date: | Fri, 19 Nov 2004 09:49:52 GMT |
| Cc: | yyyyyyyyyyyyyyyyyyyyyy@xxxxxxxxxxxxx |
Bug report from : Konrad Schwarz , Siemens AG
@ page 4 line 66 section 1.2.2 Headers objection
{thread-local-locale-extensions}
Problem:
The locale_t is defined as an opaque type in <locale.h>. It could be either a
structure or a pointer to a structure.
The duplocale(), newlocale() and freelocale() make it clear that the locale_t
is a pointer (or an arithmetic type) because of references to (locale_t) 0 to
indicate failure or default conditions.
The definition of locale_t is therefore too vague in <locale.h>; readers need
to reference more than just the description of locale.h to understand the full
set of properties available to users of a locale_t (e.g. that (locale_t) 0 can
be used to indicate illegal locales).
Action:
Either document locale_t to be defined as, e.g.,
struct __locale_t;
typedef struct __locale_t *locale_t;
in <locale.h> and derivative headers (where struct __locale_t is not further
elaborated on and remains an incomplete type)
Or follow the precedent set by <stdio.h> FILE* and textually replace all
occurances of `locale_t' by `locale_t *' (in function signatures, etc.) and
then say that locale_t is a type defined in <locale.h> (and derivative headers).
Personally, I prefer the second solution, because it does not necessitate the
definition of an otherwise unused structure tag (which can never be legally
used).
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Proposal [Thread-Aware Locale Extension D1.2], Andrew Josey |
|---|---|
| Next by Date: | Bug in Work Item 1.2.2 newlocale, konrad.schwarz |
| Previous by Thread: | Proposal [Thread-Aware Locale Extension D1.2], Andrew Josey |
| Next by Thread: | Bug in Work Item 1.2.2 newlocale, konrad.schwarz |
| Indexes: | [Date] [Thread] [All Lists] |