<div dir="ltr"><div style>Hi Peter,</div><div style><br></div>On Mon, Jul 8, 2013 at 12:27 AM, Peter Enerccio <span dir="ltr"><<a href="mailto:enerccio@gmail.com" target="_blank">enerccio@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Constness of a pointer, in c and c++ means absolutely nothing. It is just a way for programmer to self policy, same as private/public in c++/java, they are only for compilers to throw errors and programmers to avoid those errors. In memory, it is just data, and as data, in c you can force compiler to represent them in any way, ie cast. Anyways, glad to be help.<br>
</div></blockquote><div><br></div><div style>Interesting. I thought that the compiler might treat memory different if it cannot be manipulated and that in this case the const qualification therefore is enforced by the compiler.</div>
<div style><br></div><div style>Thanks again for your help!</div><div style><br></div><div style>Dietrich</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jul 8, 2013 at 12:27 AM, Peter Enerccio <span dir="ltr"><<a href="mailto:enerccio@gmail.com" target="_blank">enerccio@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Constness of a pointer, in c and c++ means absolutely nothing. It is just a way for programmer to self policy, same as private/public in c++/java, they are only for compilers to throw errors and programmers to avoid those errors. In memory, it is just data, and as data, in c you can force compiler to represent them in any way, ie cast. Anyways, glad to be help.<br>
</div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">2013/7/7 Dietrich Bollmann <span dir="ltr"><<a href="mailto:dietrich@formgames.org" target="_blank">dietrich@formgames.org</a>></span><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">On Sun, Jul 7, 2013 at 9:48 PM, ... <span dir="ltr"><<a href="mailto:enerccio@gmail.com" target="_blank">.</a>..></span> wrote:<div><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">Why cant you just cast it in the inline part? (void*) comes to mind...<br></div></blockquote></div></div><div class="gmail_extra"><br>Because I thought that it is not possible to "cast away" a const qualification...<br>
<br>...But you are completely right: even if this might not be a good thing to do under normal circumstances, it actually is possible and solves the problem :)<br><br>Thanks for the advice!<span><font color="#888888"><br>
<br>Dietrich</font></span></div><div><br>
</div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jul 7, 2013 at 8:52 PM, Dietrich Bollmann <span dir="ltr"><<a href="mailto:dietrich@formgames.org" target="_blank">dietrich@formgames.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>How can I wrap and return the constant pointer </div>
<div><br></div><div> const CRhinoCommandContext *context;<br>
</div><div><br></div><div>with c-inline?</div>
<div><br></div><div>Using something like<br></div><div><br></div><div> (ffi:c-inline () () :pointer-void "context" :one-liner t)<br></div><div><br></div><div>results in the error</div>
<div><br></div><div><div> error C2664: 'ecl_make_foreign_data' : cannot convert parameter 3 from 'const CRhinoCommandContext *' to 'void *'</div><div> Conversion loses qualifiers</div>
<div><br></div><div>But I couldn't find something like :const-pointer-void...</div><div><br></div><div>How can I solve this problem?</div><div><br></div><div>Thanks,</div><div><br></div>
<div>Dietrich</div><div><br></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><br></div></div><span class=""><font color="#888888">-- <br><div dir="ltr">Bc. Peter Vaňušanik<br></div>
</font></span></div>
</blockquote></div><br></div></div>