setTypeInfo???
dsimcha
dsimcha at yahoo.com
Sat Aug 30 14:26:08 PDT 2008
I've noticed something strange with the setTypeInfo() function in gc.d. Ran
into it trying to write some custom allocation functions for dynamic arrays.
writefln(typeid(uint).flags); //Returns 0.
writefln(typeid(float).flags); //Returns 0.
writefln(typeid(uint*).flags); //Returns 1.
writefln(typeid(void*).flags); //Returns 1.
Docs say that the above behavior is correct.
However, :
void setTypeInfo(TypeInfo ti, void* p)
{
if (ti.flags() & 1)
hasNoPointers(p);
else
hasPointers(p);
}
Is this really backwards in DMD 2.018? If so, how can it possibly have taken
this long for someone to notice something this obvious? I can't find anything
in Bugzilla about this.
More information about the Digitalmars-d
mailing list