Jeremy Kloth added the comment: 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 <rep...@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 <rep...@bugs.python.org> > <http://bugs.python.org/issue18407> > _______________________________________ ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18407> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com