TypeDef array of size 1
- From: CJ <nospam@xxxxxxxxxxxxxx>
- Date: Fri, 30 Nov 2007 20:34:14 +0100 (CET)
Hello friends,
It seems to be quite common in libraries (e.g. GMP) to have typedefs
like
typedef struct {
/* stuff */
} __type_struct;
typedef __type_struct type_t[1];
I guess the advantage of this is that it allows type_t variables to be
passed by reference without an extra level of indirection.
Is this considered good C style? Are there any problems or pitfalls to
be wary of with this approach?
.
- Prev by Date: Re: rpcgen cannot find any C Preprocessor
- Next by Date: Re: about string and character
- Previous by thread: Re: 25 MOST FREQUENTLY ASKED QUESTIONS ABOUT ISLAM
- Next by thread: There is really important wrong, but I couldnt find
- Index(es):
Relevant Pages
|