<br>[Much time passes]<br><br>I went ahead and added this warning. I kept thinking I should write a more detailed explanation about why this is a problem, but I never got around to it. At least this let's people know that there are some dragons to be wary of.
<br><br><br>-tim<br><br><br><div><span class="gmail_quote">On 5/28/07, <b class="gmail_sendername">Francesc Altet</b> <<a href="mailto:faltet@carabos.com">faltet@carabos.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
El dv 25 de 05 del 2007 a les 14:19 -0700, en/na Timothy Hochberg va<br>escriure:<br>> Don't feel bad, when I had a very similar problem early on when we<br>> were first adding multiple types and it mystified me for considerably
<br>> longer than this seems to have stumped you.<br><br>Well, I wouldn't say the truth if I say that this doesn't help ;)<br><br>Anyway, I think that this piece of code is dangerous enough and in order<br>to avoid someone (including me!) tripping over it again, it would be
<br>nice to apply the next 'patch':<br><br>Index: interp_body.c<br>===================================================================<br>--- interp_body.c       (revision 3053)<br>+++ interp_body.c       (working copy)
<br>@@ -89,6 +89,9 @@<br>         unsigned int arg2 = params.program[pc+3];<br>         #define      arg3   params.program[pc+5]<br>         #define store_index params.index_data[store_in]<br>+        /* WARNING: From now on, only do references to 
params.mem[arg[123]]<br>+          & params.memsteps[arg[123]] inside the VEC_ARG[123] macros,<br>+           or you will risk accessing invalid addresses.  */<br>         #define reduce_ptr  (dest + flat_index(&store_index, j))
<br>         #define i_reduce    *(long *)reduce_ptr<br>         #define f_reduce    *(double *)reduce_ptr<br><br>Cheers,<br><br>--<br>Francesc Altet    |  Be careful about using the following code --<br>Carabos Coop. V.  |  I've only proven that it works,
<br><a href="http://www.carabos.com">www.carabos.com</a>   |  I haven't tested it. -- Donald Knuth<br><br>_______________________________________________<br>Numpy-discussion mailing list<br><a href="mailto:Numpy-discussion@scipy.org">
Numpy-discussion@scipy.org</a><br><a href="http://projects.scipy.org/mailman/listinfo/numpy-discussion">http://projects.scipy.org/mailman/listinfo/numpy-discussion</a><br></blockquote></div><br><br clear="all"><br>-- <br>
.  __<br>.   |-\<br>.<br>.  <a href="mailto:tim.hochberg@ieee.org">tim.hochberg@ieee.org</a>