Re: [xml] what should to be 'const'?
- From: Rush Manbert <rush manbert com>
- To: massimo morara <m morara 3di it>
- Cc: xml gnome org
- Subject: Re: [xml] what should to be 'const'?
- Date: Mon, 21 May 2007 10:00:03 -0700
massimo morara wrote:
A little, little question.
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'?
Thanks.
massimo morara
The general rule is this:
Write the declaration out, then read it backwards to determine what is
const. In this case, I believe the declaration would be "const xmlNode
*", so reading it backward says that it's a pointer to a xmlNode that is
const. A const pointer would be "xmlNodePtr const node"
- Rush
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]