We have e.g. the following duplicated definitions for casting a value
to a treepath:
grep -rw define.RVAL2TREEPATH . | grep -v svn
./gtk/src/rbgtktreerowreference.c:#define RVAL2TREEPATH(p)
((GtkTreePath*)RVAL2BOXED(p, GTK_TYPE_TREE_PATH))
./gtk/src/rbgtktreemodelfilter.c:#define RVAL2TREEPATH(s)
((GtkTreePath*)RVAL2BOXED(s, GTK_TYPE_TREE_PATH))
./gtk/src/rbgtktreeselection.c:#define RVAL2TREEPATH(p)
((GtkTreePath*)RVAL2BOXED(p, GTK_TYPE_TREE_PATH))
./gtk/src/rbgtktreemodel.c:#define RVAL2TREEPATH(p)
((GtkTreePath*)RVAL2BOXED(p, GTK_TYPE_TREE_PATH))
./gtk/src/rbgtktreeview.c:#define RVAL2TREEPATH(p)
((GtkTreePath*)RVAL2BOXED(p, GTK_TYPE_TREE_PATH))
./gtk/src/rbgtktreemodelsort.c:#define RVAL2TREEPATH(s)
((GtkTreePath*)RVAL2BOXED(s, GTK_TYPE_TREE_PATH))
Wouldn’t it make sense to share them all (in a rbgtktreepath.h for
example?)
–
Guillaume C. - http://zarb.org/~gc/
Hi,
In [email protected]
“[ruby-gnome2-devel-en] sharing some value to g* casting?” on Mon, 15
Sep 2008 14:44:34 +0200,
“Guillaume C.” [email protected] wrote:
./gtk/src/rbgtktreemodel.c:#define RVAL2TREEPATH(p)
((GtkTreePath*)RVAL2BOXED(p, GTK_TYPE_TREE_PATH))
./gtk/src/rbgtktreeview.c:#define RVAL2TREEPATH(p)
((GtkTreePath*)RVAL2BOXED(p, GTK_TYPE_TREE_PATH))
./gtk/src/rbgtktreemodelsort.c:#define RVAL2TREEPATH(s)
((GtkTreePath*)RVAL2BOXED(s, GTK_TYPE_TREE_PATH))
Wouldn’t it make sense to share them all (in a rbgtktreepath.h for example?)
What about rbgtkprivate.h?
Thanks,
kou
Wouldn’t it make sense to share them all (in a rbgtktreepath.h for example?)
What about rbgtkprivate.h?
oh, that naming looks ok to me - though what about people writing
small C extensions to ruby-gnome2 for their rg2-based ruby programs?
maybe it would make sense for them to use these definitions as well?
–
Guillaume C. - Guillaume Cottenceau
Hi,
In [email protected]
“Re: [ruby-gnome2-devel-en] sharing some value to g* casting?” on Mon,
15 Sep 2008 15:05:41 +0200,
“Guillaume C.” [email protected] wrote:
Wouldn’t it make sense to share them all (in a rbgtktreepath.h for example?)
What about rbgtkprivate.h?
oh, that naming looks ok to me - though what about people writing
small C extensions to ruby-gnome2 for their rg2-based ruby programs?
maybe it would make sense for them to use these definitions as well?
What about rbgtkconversions.h and rbgtk.h includes it?
Thanks,
kou
What about rbgtkconversions.h and rbgtk.h includes it?
Ok. What about the attached patch, as a starting point? Of course more
boxed values conversions would be good, after these ones
(unfortunately the bulk of the patch is to change the ITR2RVAL pattern
to TREEITER2RVAL which is more consistent, and much more
understandable if we’re going for “global to rbgtk” conversions).
On Tue, Sep 16, 2008 at 3:29 PM, Kouhei S. [email protected] wrote:
(unfortunately the bulk of the patch is to change the ITR2RVAL pattern
to TREEITER2RVAL which is more consistent, and much more
understandable if we’re going for “global to rbgtk” conversions).
I think we should add GTK prefix like GTKTREEITER2RVAL and
RVAL2GTKTREEITER. Otherwise look fine.
And keep TREEPATH2RVAL and RVAL2TREEPATH?
–
Guillaume C. - Guillaume Cottenceau
Hi,
In [email protected]
“Re: [ruby-gnome2-devel-en] sharing some value to g* casting?” on Tue,
16 Sep 2008 15:11:28 +0200,
“Guillaume C.” [email protected] wrote:
What about rbgtkconversions.h and rbgtk.h includes it?
Ok. What about the attached patch, as a starting point? Of course more
boxed values conversions would be good, after these ones
(unfortunately the bulk of the patch is to change the ITR2RVAL pattern
to TREEITER2RVAL which is more consistent, and much more
understandable if we’re going for “global to rbgtk” conversions).
I think we should add GTK prefix like GTKTREEITER2RVAL and
RVAL2GTKTREEITER. Otherwise look fine.
Thanks,
kou
Hi,
In [email protected]
“Re: [ruby-gnome2-devel-en] sharing some value to g* casting?” on Thu,
18 Sep 2008 14:52:03 +0200,
“Guillaume C.” [email protected] wrote:
boxed values conversions would be good, after these ones
(unfortunately the bulk of the patch is to change the ITR2RVAL pattern
to TREEITER2RVAL which is more consistent, and much more
understandable if we’re going for “global to rbgtk” conversions).
I think we should add GTK prefix like GTKTREEITER2RVAL and
RVAL2GTKTREEITER. Otherwise look fine.
And keep TREEPATH2RVAL and RVAL2TREEPATH?
I want to add GTK prefix to them.
Thanks,
kou