Feature Request: Change the delegate type to void[] data insteadof void *ptr.
BCS
ao at pathlink.com
Wed Oct 3 22:49:49 PDT 2007
Reply to Downs,
>> R delegate(T) close(R, T...)(R delegate(T) dg)
>> {
>> typeof(dg) res=dg;
>> res.data=res.data.dup; // eventually moves area of stack into RAM
>> return res;
>> }
how will that more stack data into ram? If the delegate gets an array of
pointers to stack frames (or objects) then what you get is a copy of the
pointers that still point into the stack (or objects). If what you have is
a slice of the stack, then what about the next function out? you will either
still have a reference to another stack frame, or won't have access to it
at all. You might get something with a void[][], but then you need to do
an alloc on each delegate creation, not to mention Gregor's issue.
More information about the Digitalmars-d
mailing list