Use macros to register boxed types thread safely
[platform/upstream/gstreamer.git] / gst / gstpadtemplate.c
index d023bd0..d7fe0a5 100644 (file)
@@ -272,17 +272,7 @@ name_is_valid (const gchar * name, GstPadPresence presence)
   return TRUE;
 }
 
-GType
-gst_static_pad_template_get_type (void)
-{
-  static GType staticpadtemplate_type = 0;
-
-  if (G_UNLIKELY (staticpadtemplate_type == 0)) {
-    staticpadtemplate_type =
-        g_pointer_type_register_static ("GstStaticPadTemplate");
-  }
-  return staticpadtemplate_type;
-}
+G_DEFINE_POINTER_TYPE (GstStaticPadTemplate, gst_static_pad_template);
 
 /**
  * gst_static_pad_template_get:
@@ -325,7 +315,7 @@ gst_static_pad_template_get (GstStaticPadTemplate * pad_template)
  * Creates a new pad template with a name according to the given template
  * and with the given arguments.
  *
- * Returns: (transfer full): a new #GstPadTemplate.
+ * Returns: (transfer floating): a new #GstPadTemplate.
  */
 GstPadTemplate *
 gst_pad_template_new (const gchar * name_template,