Thread overview | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
August 22, 2010 [phobos] phobos commit, revision 1924 | ||||
---|---|---|---|---|
| ||||
phobos commit, revision 1924 user: andrei msg: replaced ssize_t with sizediff_t http://www.dsource.org/projects/phobos/changeset/1924 |
August 22, 2010 [phobos] phobos commit, revision 1924 | ||||
---|---|---|---|---|
| ||||
Posted in reply to dsource.org | But now we have:
ptrdiff_t
sizediff_t
ssize_t
all aliased to the same type. What's the rationale for when one uses which?
dsource.org wrote:
> phobos commit, revision 1924
>
>
> user: andrei
>
> msg:
> replaced ssize_t with sizediff_t
>
> http://www.dsource.org/projects/phobos/changeset/1924
>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
>
>
>
|
August 22, 2010 [phobos] phobos commit, revision 1924 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | I tried the uninspired name ssize_t; the problem is it conflicted with unistd.d and I couldn't disambiguate due to what seems to be a compiler bug.
I meant to use sizediff_t as a temporary until we settle on a final solution. When we do, I'll replace that symbol with whatever we settle for.
Andrei
On 08/22/2010 05:14 PM, Walter Bright wrote:
> But now we have:
>
> ptrdiff_t
> sizediff_t
> ssize_t
>
> all aliased to the same type. What's the rationale for when one uses which?
>
> dsource.org wrote:
>> phobos commit, revision 1924
>>
>>
>> user: andrei
>>
>> msg:
>> replaced ssize_t with sizediff_t
>>
>> http://www.dsource.org/projects/phobos/changeset/1924
>>
>> _______________________________________________
>> phobos mailing list
>> phobos at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/phobos
>>
>>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
|
August 23, 2010 [phobos] phobos commit, revision 1924 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | ssize_t appears to be incorrectly defined in types.d, which unistd.d imports. It is supposed to be a "signed" size_t, whereas there are aliases in it that make it size_t. For example, OSX's /usr/include files definite set it to be a long, not a size_t as set in types.d. It looks like all the aliases need to be double checked.
Andrei Alexandrescu wrote:
> I tried the uninspired name ssize_t; the problem is it conflicted with unistd.d and I couldn't disambiguate due to what seems to be a compiler bug.
>
> I meant to use sizediff_t as a temporary until we settle on a final solution. When we do, I'll replace that symbol with whatever we settle for.
>
>
> Andrei
>
> On 08/22/2010 05:14 PM, Walter Bright wrote:
>> But now we have:
>>
>> ptrdiff_t
>> sizediff_t
>> ssize_t
>>
>> all aliased to the same type. What's the rationale for when one uses which?
>>
>> dsource.org wrote:
>>> phobos commit, revision 1924
>>>
>>>
>>> user: andrei
>>>
>>> msg:
>>> replaced ssize_t with sizediff_t
>>>
>>> http://www.dsource.org/projects/phobos/changeset/1924
>>>
>>> _______________________________________________
>>> phobos mailing list
>>> phobos at puremagic.com
>>> http://lists.puremagic.com/mailman/listinfo/phobos
>>>
>>>
>> _______________________________________________
>> phobos mailing list
>> phobos at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/phobos
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
>
>
|
August 23, 2010 [phobos] phobos commit, revision 1924 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Oops. I'll check that out. Why not use ptrdiff_t though? It's already defined in object.d for this purpose, and unlike ssize_t it's a standard C typedef.
On Aug 23, 2010, at 4:36 AM, Walter Bright wrote:
> ssize_t appears to be incorrectly defined in types.d, which unistd.d imports. It is supposed to be a "signed" size_t, whereas there are aliases in it that make it size_t. For example, OSX's /usr/include files definite set it to be a long, not a size_t as set in types.d. It looks like all the aliases need to be double checked.
>
> Andrei Alexandrescu wrote:
>> I tried the uninspired name ssize_t; the problem is it conflicted with unistd.d and I couldn't disambiguate due to what seems to be a compiler bug.
>>
>> I meant to use sizediff_t as a temporary until we settle on a final solution. When we do, I'll replace that symbol with whatever we settle for.
>>
>>
>> Andrei
>>
>> On 08/22/2010 05:14 PM, Walter Bright wrote:
>>> But now we have:
>>>
>>> ptrdiff_t
>>> sizediff_t
>>> ssize_t
>>>
>>> all aliased to the same type. What's the rationale for when one uses which?
>>>
>>> dsource.org wrote:
>>>> phobos commit, revision 1924
>>>>
>>>>
>>>> user: andrei
>>>>
>>>> msg:
>>>> replaced ssize_t with sizediff_t
>>>>
>>>> http://www.dsource.org/projects/phobos/changeset/1924
>>>>
>>>> _______________________________________________
>>>> phobos mailing list
>>>> phobos at puremagic.com
>>>> http://lists.puremagic.com/mailman/listinfo/phobos
>>>>
>>>>
>>> _______________________________________________
>>> phobos mailing list
>>> phobos at puremagic.com
>>> http://lists.puremagic.com/mailman/listinfo/phobos
>> _______________________________________________
>> phobos mailing list
>> phobos at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/phobos
>>
>>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
|
August 23, 2010 [phobos] phobos commit, revision 1924 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean Kelly | Th diff shows I did that for a couple files; it felt unnatural to use ptrdiff_t when almost always there were no pointers involved.
Sent by shouting through my showerhead.
On Aug 23, 2010, at 6:02 AM, Sean Kelly <sean at invisibleduck.org> wrote:
> Oops. I'll check that out. Why not use ptrdiff_t though? It's already defined in object.d for this purpose, and unlike ssize_t it's a standard C typedef.
>
> On Aug 23, 2010, at 4:36 AM, Walter Bright wrote:
>
>> ssize_t appears to be incorrectly defined in types.d, which unistd.d imports. It is supposed to be a "signed" size_t, whereas there are aliases in it that make it size_t. For example, OSX's / usr/include files definite set it to be a long, not a size_t as set in types.d. It looks like all the aliases need to be double checked.
>>
>> Andrei Alexandrescu wrote:
>>> I tried the uninspired name ssize_t; the problem is it conflicted with unistd.d and I couldn't disambiguate due to what seems to be a compiler bug.
>>>
>>> I meant to use sizediff_t as a temporary until we settle on a final solution. When we do, I'll replace that symbol with whatever we settle for.
>>>
>>>
>>> Andrei
>>>
>>> On 08/22/2010 05:14 PM, Walter Bright wrote:
>>>> But now we have:
>>>>
>>>> ptrdiff_t
>>>> sizediff_t
>>>> ssize_t
>>>>
>>>> all aliased to the same type. What's the rationale for when one uses which?
>>>>
>>>> dsource.org wrote:
>>>>> phobos commit, revision 1924
>>>>>
>>>>>
>>>>> user: andrei
>>>>>
>>>>> msg:
>>>>> replaced ssize_t with sizediff_t
>>>>>
>>>>> http://www.dsource.org/projects/phobos/changeset/1924
>>>>>
>>>>> _______________________________________________
>>>>> phobos mailing list
>>>>> phobos at puremagic.com
>>>>> http://lists.puremagic.com/mailman/listinfo/phobos
>>>>>
>>>>>
>>>> _______________________________________________
>>>> phobos mailing list
>>>> phobos at puremagic.com
>>>> http://lists.puremagic.com/mailman/listinfo/phobos
>>> _______________________________________________
>>> phobos mailing list
>>> phobos at puremagic.com
>>> http://lists.puremagic.com/mailman/listinfo/phobos
>>>
>>>
>> _______________________________________________
>> phobos mailing list
>> phobos at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/phobos
>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
|
August 27, 2010 [phobos] phobos commit, revision 1924 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | It was correct on linux, but not OSX or FreeBSD. Fixed.
On Aug 23, 2010, at 1:36 AM, Walter Bright wrote:
> ssize_t appears to be incorrectly defined in types.d, which unistd.d imports. It is supposed to be a "signed" size_t, whereas there are aliases in it that make it size_t. For example, OSX's /usr/include files definite set it to be a long, not a size_t as set in types.d. It looks like all the aliases need to be double checked.
>
> Andrei Alexandrescu wrote:
>> I tried the uninspired name ssize_t; the problem is it conflicted with unistd.d and I couldn't disambiguate due to what seems to be a compiler bug.
>>
>> I meant to use sizediff_t as a temporary until we settle on a final solution. When we do, I'll replace that symbol with whatever we settle for.
>>
>>
>> Andrei
>>
>> On 08/22/2010 05:14 PM, Walter Bright wrote:
>>> But now we have:
>>>
>>> ptrdiff_t
>>> sizediff_t
>>> ssize_t
>>>
>>> all aliased to the same type. What's the rationale for when one uses which?
>>>
>>> dsource.org wrote:
>>>> phobos commit, revision 1924
>>>>
>>>>
>>>> user: andrei
>>>>
>>>> msg:
>>>> replaced ssize_t with sizediff_t
>>>>
>>>> http://www.dsource.org/projects/phobos/changeset/1924
>>>>
>>>> _______________________________________________
>>>> phobos mailing list
>>>> phobos at puremagic.com
>>>> http://lists.puremagic.com/mailman/listinfo/phobos
>>>>
>>>>
>>> _______________________________________________
>>> phobos mailing list
>>> phobos at puremagic.com
>>> http://lists.puremagic.com/mailman/listinfo/phobos
>> _______________________________________________
>> phobos mailing list
>> phobos at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/phobos
>>
>>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
|
Copyright © 1999-2021 by the D Language Foundation