Web lists-archives.com

Re: g_object_ref() now propagates types

On Fri, Dec 8, 2017 at 6:26 AM, Philip Withnall <philip@xxxxxxxxxxxxxxx> wrote:
Hi all,

We just landed a patch in GLib which propagates the type from the
argument of g_object_ref() to its return type:


The idea here is that it will catch invalid implicit casts which the
compiler otherwise wouldn’t have noticed because g_object_ref()
previously operated entirely on gpointers. This will eliminate a whole
class of bugs: bugs which are unlikely to exist, but are a complete
pain to track down if they do.

​Great work. Another 3 or 4 or 200 of these and we'll almost have a C++ compiler!

tongue firmly and warmly in cheek :))) ​

gtk-devel-list mailing list