[
Lists Home |
Date Index |
Thread Index
]
>
> Don't you want to know if genx is going to copy the pointers or copy the
> data pointed to by them?
doh, never mind that reason; typo/brain-damage.
I think it's useful to be able to know if an API is going to modify the
input parameters at all. for example, without const, you don't know --
outside of reading the code, or perhaps the documentation -- if this will
segfault or not
genxAddText(w, "asdfasdfasdf");
Now, that's unlikely, but the add bounded text might try to cheat and
temporarily insert a \0 byte and then replace it. If the compiler puts
fixed text strings into read-only memory, as it is free to do, then such
a technique would probably segfault.
/r$
--
Rich Salz Chief Security Architect
DataPower Technology http://www.datapower.com
XS40 XML Security Gateway http://www.datapower.com/products/xs40.html
XML Security Overview http://www.datapower.com/xmldev/xmlsecurity.html
|