Re: mshtml: Implement HTMLElement_get_children.

2007-06-25 Thread Robert Shearman

Jacek Caban wrote:

+elem_vector buf = {NULL, 0, 8};
+
+TRACE((%p)-(%p)\n, This, p);
+
+buf.buf = mshtml_alloc(buf.size*sizeof(HTMLElement**));




elem_vector is a self-resizable table, but in this case you know the size while 
creating it from nsIDOMNodeList::GetLength. I'd suggest to use it here during 
creation of buf to avoid useless memory reallocations.


I've just sent a new patch which includes this suggestion.

--
Rob Shearman





Re: mshtml: Implement HTMLElement_get_children.

2007-06-24 Thread Jacek Caban
Hi,

 +elem_vector buf = {NULL, 0, 8};
 +
 +TRACE((%p)-(%p)\n, This, p);
 +
 +buf.buf = mshtml_alloc(buf.size*sizeof(HTMLElement**));


elem_vector is a self-resizable table, but in this case you know the size while 
creating it from nsIDOMNodeList::GetLength. I'd suggest to use it here during 
creation of buf to avoid useless memory reallocations.

Thanks,
Jacek