<div dir="ltr"><div><div><div><div><div>Hi,<br><br></div>As I mentioned a while ago on #varnish-hacking I've been thinking it'd be kinda nice to have a delete keyword.<br></div><div>One of the reasons was to use malloc'd memory.  The other was to express transformations like:<br>

</div><div><br></div>mod.func1(mod.func2(mod.func3(foo)))<br><br></div><div>In what I think a more friendly way:<br><br></div><div>bar.func1();<br>bar.func2();<br>bar.func3();<br></div></div><br></div><div>Or perhaps even:<br>

<br></div><div>bar.func1().func2().func3();<br></div><div><br></div><div>This weekend, while I was talking to Dag, I thought of another reason I'd like to see this in: to have per-request states.<br><br></div><div>Currently this is done manually using ctx->req->sp->fd as an index to a malloc'd list. The other option is to use thread-specific data but I was explained this won't work over waitinglist'd requests. Both of these approaches only work for single states btw.<br>
<br>A PRIV_REQ type will solve single state cases and has the extra benefit of somewhat automatic clean up when the request is done.<br><br>Thoughts?<br><br>f.-<br>
<br><br><br></div></div>