[squid-dev] [PATCH] mempools-nozero part 3: wordlist

Kinkie gkinkie at gmail.com
Mon Aug 24 15:30:45 UTC 2015


Hi,
   this patch:
- removes unused wordlistDup
- implements proper constructors for wordlist, making it MEMPROXY_CLASS-safe
- makes its destructor private to force clients to use wordlistDestroy
instead
- implements wordlistChopHead to support the one case in the whole codebase
where a wordlist element was legitimately deleted.

The code looks odd, but this is an unfortunate consequence of asymmetric
expectations on the construct/destruct side: construct side requrires C++
semantics for MEMPROXY_CLASS, destruct side callers expect C semantics.

The code has been build- and run- tested.

Patch with big context attached.


-- 
    Francesco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20150824/d9263f4c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mempools-nozero-wordlist.patch
Type: application/octet-stream
Size: 7463 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20150824/d9263f4c/attachment.obj>


More information about the squid-dev mailing list