chiark / gitweb /
hashmap: return NULL from destructor
authorDavid Herrmann <dh.herrmann@gmail.com>
Fri, 10 Apr 2015 09:15:12 +0000 (11:15 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 06:54:45 +0000 (07:54 +0100)
commit99e651c2dc93fcc0ce762e7dab2dd3e9a70d76a1
treeb3c75c218d1bc37aaf760444155c9b8b851acea0
parent322e94abd97bbd3b8b0d37719449c0be5b9d99d8
hashmap: return NULL from destructor

We _always_ return NULL from destructors to allow direct assignments to
the variable holding the object. Especially on hashmaps, which treat NULL
as empty hashmap, this is pretty neat.
src/shared/hashmap.c
src/shared/hashmap.h