On 05/02/2015 11:45, Nicholas Nethercote wrote:
> Hi,
> 
> I just landed the patches in
> https://bugzilla.mozilla.org/show_bug.cgi?id=1050035. They
> affect PLDHashTable's API in the following ways.
> 
> - PLDHashTable now allocates its entry storage lazily. (nsTHashtable and
>   friends do too, since they are just layers on top of PLDHashTable.) This is 
> a
>   nice space win because about 45% of all created PLDHashTables never get any
>   elements inserted into them.
> 
> - As a result, PL_DHashTableInit() is now infallible. This is possible because
>   the allocation of entry storage now only occurs on table insertion, in
>   PL_DHashTableAdd().
> 
> - An infallible version of PL_DHashTableAdd() has been added. To use the
>   fallible version you need a |fallible_t| argument. All the old callsites 
> were
>   updated appropriately, to keep them fallible.
> 
> - PLD_NewDHashTable() and PLD_HashTableDestroy() have been removed. You should
>   now just use |new|+PL_DHashTableInit() and PLD_HashTableDestroy()+|delete|,
ITYM PL_DHashTableFinish()+|delete|

>   which are more obvious and only slightly more verbose. (And I have plans to
>   add a destructor and an initializing constructor, so in the end you'll be
>   able to just use |new| and |delete|).
> 
> I prepared a comm-central update patch in
> https://bugzilla.mozilla.org/show_bug.cgi?id=1129692.
> 
> Nick

Phil

-- 
Philip Chee <phi...@aleytys.pc.my>, <philip.c...@gmail.com>
http://flashblock.mozdev.org/ http://xsidebar.mozdev.org
Guard us from the she-wolf and the wolf, and guard us from the thief,
oh Night, and so be good for us to pass.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to