[PATCH 1/4] jscript: Use custom string container instead of BSTR.

Jacek Caban jacek at codeweavers.com
Thu Oct 11 07:26:27 CDT 2012


On 10/11/12 12:39, Henri Verbeet wrote:
> On 11 October 2012 12:16, Jacek Caban <jacek at codeweavers.com> wrote:
>> +struct _jsstr_t {
>> +    unsigned length_flags;
>> +    unsigned ref;
>> +    WCHAR str[1];
>> +};
> It's probably much too late for jscript, and perhaps Wine in general,
> but strictly speaking the _t suffix is reserved by POSIX.

I consider using it a matter of taste. It's often convenient to add
suffix so that the namespace is free for things like that:

mystryct_t *mystruct;

(and struct mystruct *mystruct; is a worse solution IMHO).

As a matter of fact, I was considering dropping _t suffix for jsstr_t
type (as well as jsval_t, which I introduced lately) mostly because
those types are so core for jscript that they deserve looking a bit like
base types. I didn't know about the suffix reservation for POSIX (well,
C99 also uses _t and it's not part of POSIX), that's a good point.

That said, I don't have strong opinion here for general practices in
Wine. I will reconsider dropping the suffix for a few types.

Jacek



More information about the wine-devel mailing list