[gstreamer-bugs] [Bug 539108] gst_ghost_pad_new() does more than call g_object_new()
bugzilla-daemon at bugzilla.gnome.org
Sun Jun 29 02:05:26 PDT 2008
If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
GStreamer | gstreamer (core) | Ver: HEAD CVS
------- Comment #11 from Murray Cumming 2008-06-29 09:05 UTC -------
(In reply to comment #9)
> Murray, just curious but how are you handling parameter checking in the C++
> bindings? Most of the foo_type_new() functions check the parameters and return
> NULL or something when something is wrong... if you just call g_object_new()
> you could create broken object instances as g_object_new() can't fail.
We generally don't and that's generally not a problem because most _new()
functions don't do much checking. And they shouldn't need to, because libraries
should expect that people will use just g_object_new(). This should really be
avoided - it's far better to always create an instance and have an extra
is_valid() function if necessary.
But if we use the new _construct() functions then hopefully we can still be
told about failures and return a null Glib::RefPtr from our create() functions.
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.
You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=539108.
More information about the Gstreamer-bugs