From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Philipp Stephani
On 09/13/2015 06:04 AM, Philipp Stephani wrote:
> Daniel Colascione <dancol@dancol.org <mailto:dancol@dancol.org>> schrieb
> am So., 15. Feb. 2015 um 21:21 Uhr:
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0typedef struct emacs_value_tag* emacs_value;=
>
>
> Would it make sense to not use a typedef here? Using a typedef means > that the type including its size is opaque and subject to change, whic= h
> can break ABI compatibility. I'd rather have something like:
>
> struct emacs_value {
>=C2=A0 =C2=A0// contains private fields
> };
>
> and then pass /struct emacs_value*/ around.
You may have missed the "*" in the typedef. The difference is sty= listic.
There's no difference between foo and bar here.
typedef struct valuex* value;
void foo(struct valuex* x);
void bar(value y);
I find the typedef much more readable, however.