In message: <[EMAIL PROTECTED]>
            Anthony Liguori <[EMAIL PROTECTED]> writes:
: To me, const char * always implies that you don't own the memory.  This 
: is helped by the fact that free doesn't take a const void * and newer 
: GCC's will complain if you free() a const char *.

Sadly, this is a bug, as it precludes the use pattern of initializing
char * data, casting it to const char * (a valid cast) and then
relying on the compiler to thereafter enforce its constness.

Const does *NOT* imply that you don't own the memory.  Its narrow
meaning is just that the object won't be changed through this
pointer/reference.

Warner


_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Reply via email to