Re: Gtk2::TreeModel get() vs bleeding perl EXTEND()



On 08.11.2015 09:34, Kevin Ryde wrote:
Apparently perl 23.something pre-releases are threatening to make xs
EXTEND() of negative amounts an error.  I have this from cpantesters of
some of my code per https://rt.cpan.org/Ticket/Display.html?id=108274
but I don't have a bleeding perl to actually try.

If I'm right it occurs when gtk_tree_model_get() in xs/GtkTreeModel.xs
is asked to fetch all columns of a 1-column tree model, resulting in
EXTEND(-1).  Such an extend is ok, since items==2 in that case and the
stack is going down to 1 item for the return, but apparently the
negativity of EXTEND() doesn't notice that.  Perhaps it would be worth
gtk_tree_model_get() extending only when needed, n_columns > items or
whatever the case.  The SP+= would still be done of course.

Yes, this seems to be what's going on. This fixes it for me: <https://git.gnome.org/browse/perl-Gtk2/commit/?id=eb29c8b6faf1a1774b943405a021fdad215498ae>.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]