Inconsistency of .mangleof?
Ary Borenszweig
ary at esperanto.org.ar
Mon Dec 24 12:06:32 PST 2007
Hi all,
Object.mangleof == "C6Object"
Interface.mangleof == "S6object9Interface"
Both are defined in the module object.d
Why Object.mangleof isn't "C6object6Object"? It also happens with
ClassInfo ("C9ClassInfo").
I'm currently using mangled representations of types to store references
to other types in Descent, while at the same time respecting the D spec.
Then I search for a symbol in the hierarchy by parsing the mangled name.
But because of the inconsistency of "C6Object" I'll have to hardcode
that value means "Object in module object". Same as for other types in
module object (in other, user defined modules it doesn't happen).
Is there any reason for this?
Thanks,
Ary
More information about the Digitalmars-d-learn
mailing list