<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 18, 2015 at 11:17 AM, Lawrence D'Oliveiro <span dir="ltr"><<a href="mailto:ldo@geek-central.gen.nz" target="_blank">ldo@geek-central.gen.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, 18 Dec 2015 10:29:53 -0800, Bill Spitzak wrote:<br>
<br>
> Can const be used? Perhaps with a "#define const /*nothing*/" on<br>
> compilers that don't actually support it?<br>
<br>
</span>Considering it became a standard part of C in *1989*, are there still<br>
serious C compilers around that can’t handle it?<br></blockquote><div><br></div><div>I doubt it, but I could not understand why const is not being used or why the original poster asked this question.<br><br></div><div>Basically if the function is:<br><br></div><div>    foo (cairo_bar* bar)<br><br></div><div>then it is defined as modifying *bar.<br><br></div><div>If the function is:<br><br></div><div>    foo (const cairo_bar* bar)<br><br></div><div>then it is not going to modify *bar.<br><br></div><div>It's too bad that C requires you to add a keyword in the more common const case, but we have to live with that. Isn't this sufficient to make it clear which functions modify the structures?<br><br></div></div><br></div></div>