Message192696
The change in grammar.c:addlabel() is correct. The return value is an
index into the ll->ll_label array, thus an int. The code could be
rewritten to avoid the pointer addition by saving the value of
ll->ll_nlabels before it is incremented and return that instead,
On Mon, Jul 8, 2013 at 1:23 PM, STINNER Victor <report@bugs.python.org> wrote:
>
> STINNER Victor added the comment:
>
> This issue duplicates the isuse #9566, but your patch is interesting. I created other more specific issues like #18295 and #18294.
>
> - return lb - ll->ll_label;
> + return Py_SAFE_DOWNCAST(lb - ll->ll_label, Py_intptr_t, int);
>
> I don't think that such change is correct, IMO the right fix is to change the result type to Py_intptr_t.
>
> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue18407>
> _______________________________________ |
|
Date |
User |
Action |
Args |
2013-07-08 20:57:26 | jeremy.kloth | set | recipients:
+ jeremy.kloth, loewis, vstinner, christian.heimes, tim.golden, jkloth, brian.curtin |
2013-07-08 20:57:26 | jeremy.kloth | link | issue18407 messages |
2013-07-08 20:57:26 | jeremy.kloth | create | |
|