[xml] duplicated code in "tree.c"



  Hello,

  I've just looked inside "tree.c" from the "gnome-xml" package to make
sure that "xmlNewProp" is just a call to "xmlNewNsProp" with ns=NULL.
To my surpruse, it's not so. Quite a non-trivial code is duplicated,
and "xmlNewNsProp" misses the check

    if ((node != NULL) && (node->type != XML_ELEMENT_NODE))
        return(NULL);

  I think it's a good idea to eliminate this duplication.


-- 
Oleg Paraschenko  olpa@ http://xmlhack.ru/  XML news in Russian
http://uucode.com/blog/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]