[PATCH] Add a miniobj macro for pointer acquisitions

Dridi Boukelmoune dridi at varni.sh
Sun Mar 13 23:33:57 CET 2016


Hi,

In this evening's offline self-hackathon in the train I came up with a
macro for a recurring pattern in Varnish Cache that I also happen to
use in at least one VMOD so it might benefit others too.

I used Coccinelle (and still love it) in order to apply the change, so
if the first patch is accepted you remember doing this kind of pointer
acquisition in one of your VMOD or VUT, I've attached the semantic
patch too.

If the name "acquire" is not appropriate (because I know at least one
other meaning) please know that I'm short on naming ideas.

Best,
Dridi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-a-miniobj-macro-for-pointer-acquisitions.patch
Type: text/x-patch
Size: 1577 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20160313/d82a1668/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Use-the-ACQUIRE_OBJ_NOTNULL-macro-where-relevant.patch
Type: text/x-patch
Size: 8461 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20160313/d82a1668/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: acquire.cocci
Type: application/octet-stream
Size: 127 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20160313/d82a1668/attachment.obj>


More information about the varnish-dev mailing list