msxml3-implement-domcomment_replaceData

Nikolay Sivov bunglehead at gmail.com
Sat Feb 6 05:16:05 CST 2010


On 2/5/2010 20:18, jose rostagno wrote:
> implement missing domcomment_replaceData
> +    if((offset == 0) || ((count + offset)>= len))
> +    {
> +        if(offset == 0){
> +            IXMLDOMComment_substringData(iface, count, len - count,&str);
> +            hr = IXMLDOMComment_put_data(iface, str);
> +	    if(hr == S_OK)
> +            hr = IXMLDOMComment_appendData(iface, p);
>    
This doesn't look right. You're appending replacement string to the rest 
of initial string data,
and offset == 0 means to replace from the start (if I didn't miss 
something).

Also we really need some tests here, and it's trivial to test here (look 
at existing test I recently added
for deleteData() for example). Especially test for a case count != (p 
string length) is interesting.

Minor things:
- watch for indentation and please avoid tabs - most lines are indented 
with spaces,
- don't use 'if () {' style. The rest of this file uses '{' on the next 
line,
- correct your name in author filed to start with uppercase.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20100206/042cee1c/attachment.htm>


More information about the wine-devel mailing list