_argptr woes -- RFC from Walter

kris foo at bar.com
Sat Mar 17 11:36:36 PDT 2007


Frits van Bommel wrote:
>>>> kris wrote:
>>>>
>>>>> The D spec says:
>>>>>
>>>>> "The implementiations of these variadic functions have a special 
>>>>> local variable declared for them, _argptr, which is a void* pointer 
>>>>> to the first of the variadic arguments. To access the arguments, 
>>>>> _argptr must be cast to a pointer to the expected argument type"
>>>>>
>>>>>
>>>>> To me, this means that a D compiler must implement _argptr in these 
>>>>> terms. Is that indeed the case, Walter? Or is my interpretation 
>>>>> incorrect?
[snip]
> [2]: At least, I presume this discussion was brought on by the 
> non-portable code in tango.text.convert.Layout?

Indeed, although non-portable holds true only if you think in C instead 
of D. According to the D documentation that code is written "correctly", 
and thus it ought to be portable.

Walter, it would be helpful if you'd clear the air on this one? Is 
_argptr expected to be memory-based/addressable (per the documentation)?

- Kris



More information about the Digitalmars-d mailing list