Re: gtk_tree_path_new_from_indices and gtk_tree_row_reference_new



Torsten Schoenfeld said:
The first one implements gtk_tree_path_new_from_indices. The comment
that's currently there states that we should do the same that C does and
stop whenever we find a -1. I can't quite comprehend why this would be
necessary, since a) it's quite un-perl-ish and b) with XS' "items" we
have all we need to process the variable argument list.

i didn't know beans about the TreeView stuff when i started work on the
bindings; that comment is basically me taking notes on what the documentation
says is supposed to in C so i could figure out how to map it to perl.  indeed,
it should use the contents of the arg stack instead of a sentinel value, but
the C stuff looks for a sentinel value so the XS wrapper will have to add one.

also, since the C stuff will stop when it sees a -1, there's no point in us
passing the rest of the stuff after a -1, hence, 'we should stop at -1 since
that's what the C stuff will do anyway.'


I also don't understand the FIXME comment since all
this function returns is a single GtkTreePath.

there were other spots at which the C functions return NULL-terminated arrays
of objects; since i was unfamiliar with the Tree stuff, i was unsure about
this return.

that, and i was running 2.0.6 and had no way to test the 2.2.x code.  ;-)


The second one adds a change to gtk_tree_row_reference_new to the first
patch. It adds a class parameter to it and thus breaks the API.
...
I don't know whether it's too late for API changes but considering that
the row reference stuff is rarely used I think that, in this case,
consistency weighs more than backwards compatability.

things like that are broken, and thus need to be fixed.  i found several of
them this weekend, and like you said, they were all obscure and probably not
being used by anybody.



-- 
muppet <scott at asofyet dot org>



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