Re: [xml] what should to be 'const'?

massimo morara wrote:
 >   Right. You caught the point: macros and typedefs are different
        I think this is one of the less documented things of C/C++.

massimo morara wrote:
>    In the function xmlCopyNode(const xmlNodePtr node, int
> extended) [tree.c], what is supposed be 'const'?
>    The pointer 'node' or the struct pointed by 'node'?

Beside the effects for the compiler this should be read as:

The "node" argument to xmlCopyNode function is guaranteed not not
to be modified by this function (no side effects).

Cheers, Andy

FELA Management AG      Phone :+41-52-646 46 55
Basadingerstrasse 18    Fax   :+41-52-646 46 96
CH-8253 Diessenhofen    mailto:andreas stricker fela ch

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