std.signals and the object delegate limitation
Bill Baxter
dnewsgroup at billbaxter.com
Tue Apr 24 01:04:39 PDT 2007
The current std.signals assumes that all slots are delegates to Objects.
Is that still required with the new typeinfo stuff in the GC?
I see there's a setTypeInfo in std.gc, but no getTypeInfo. If it did
exist I would guess you could just do
TypeInfo ti = gc.getTypeInfo(slot.ptr);
if (derivesFrom(typeid(Object), ti)) {
Object o = _d_toObject(slot.ptr);
o.notifyRegister(&unhook);
}
It would be nice if the class-only restriction could be lifted.
--bb
More information about the Digitalmars-d
mailing list