April 24, 2007 std.signals and the object delegate limitation | ||||
|---|---|---|---|---|
| ||||
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
| ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply