[Bug 731892] gstvalue: Avoid expensive g_type_check_value_holds calls when dealing with fundamental GType

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Fri Jun 20 03:14:47 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=731892
  GStreamer | gstreamer (core) | unspecified

Sebastian Dröge (slomo) <slomo> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #278731|none                        |needs-work
             status|                            |

--- Comment #2 from Sebastian Dröge (slomo) <slomo at coaxion.net> 2014-06-20 10:14:46 UTC ---
Review of attachment 278731:
 --> (https://bugzilla.gnome.org/review?bug=731892&attachment=278731)

::: gst/gstvalue.c
@@ +44,3 @@
 #include "gstutils.h"

+#define GST_VALUE_HOLDS_FUNDAMENTAL(v,t) ((v) && ((v)->g_type == t))

GST_VALUE_HOLDS_EXACTLY() instead maybe? Fundamental values can have subtypes


Also you might want to use that for G_TYPE_INT, _STRING, other basic types too.
All over the file.

In theory they can have subtypes but we don't support that currently either

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list