[cairo] return type of cairo_status_to_string ()

Daniel Goldman dagoldman at yahoo.com
Tue Aug 17 15:21:39 PDT 2010


Could someone explain the advantage or purpose of declaring the return type for 
cairo_status_to_string () to be "const char *" instead of just "char *"? I don't 
see the advantage or purpose. But I'm probably missing something.

What bad thing does the const keyword prevent here? If nothing bad prevented, 
then I think it should be the simpler, more default "char *".

I'm not expecting a detailed off-topic discussion about the const keyword. I 
would just like a real-world example showing the purpose for this particular 
function.

Thanks,
Daniel


More information about the cairo mailing list