From: Axel S. <A....@ke...> - 2007-07-26 14:47:00
|
On Jul 25, 2007, at 16:11, Peter Gavin wrote: > 7/25/07, Axel Simon <A....@ke...> wrote: >> It's a big patch. Geez. I'm slightly worried that whatever comment I >> make incurs a lot of work. It looks like you're re-invented the wheel >> of the methods in GObject, namely constructNewGObject and >> makeNewGObject. As a consequence, I think you export some low level >> functions to the end-user, that shouldn't really be accessible. > > Don't worry about how much work a change is, I'd rather make > everything consistent and have you guys be happy with my changes. I > was going to use constructNewGObject/makeNewGObject, but GStreamer > uses floating references. I suppose I could replace the per-type > functions with a single function, though. As far as exports, I'm very > careful about what actually gets exported to the user. The end user > doesn't get the low-level functions. GObjects have floating references since version 2.10 or 2.12. I suppose it will only be a matter of time until GStreamer will be converted to use just GObjects. Floating references seems to be the only thing that GstObject adds to GObject. I'm sure GstObject goes away eventually. As to your code: I guess we leave it as it is for now and change things when GStreamer changes. You could check if you could simply use makeGObject and constructGObject. >> Do I see that correctly? Also, could you say what you had to change >> in the type generator? I don't think you needed to, it should all >> work out of the box for other libraries. E.g. the sourceview library >> is separate but its types are build by the same tools. > > Well, one thing I added was the isObject functions, which act like > GTK_IS_OBJECT etc. I suppose I could remove the withObject functions > I added and replace them with a single function. Also, GStreamer has > a hierarchy of objects that aren't derived from GObject, they actually > created a new root-object called MiniObject. So I had to add a --root > parameter that makes the type generator use the argument as the root > instead of GObject. Ok, that's weird, they've clearly suffered from the not-invented-here syndrome. So with this we have to live and then also with the changes to the hierarchy generator. I'll check the patch and push it when I'm convinced it doesn't break anything. > Thanks for looking at my work, I really appreciate it! :) Thanks for your work! Axel. |