Index: gobject/gboxed.h
===================================================================
--- gobject/gboxed.h	(revision 6285)
+++ gobject/gboxed.h	(working copy)
@@ -65,6 +65,7 @@
 #define	G_TYPE_GSTRING		(g_gstring_get_type ())
 #define	G_TYPE_HASH_TABLE	(g_hash_table_get_type ())
 #define	G_TYPE_REGEX		(g_regex_get_type ())
+#define	G_TYPE_BYTE_ARRAY	(g_byte_array_get_type ())
 
 
 void    g_value_take_boxed      (GValue		*value,
@@ -81,6 +82,7 @@
 GType	g_gstring_get_type      (void)	G_GNUC_CONST;
 GType   g_hash_table_get_type   (void)  G_GNUC_CONST;
 GType   g_regex_get_type        (void)  G_GNUC_CONST;
+GType   g_byte_array_get_type   (void)  G_GNUC_CONST;
 
 typedef gchar** GStrv;
      
Index: gobject/gboxed.c
===================================================================
--- gobject/gboxed.c	(revision 6285)
+++ gobject/gboxed.c	(working copy)
@@ -252,7 +252,35 @@
   return type_id;
 }
 
+static gpointer
+byte_array_copy (gpointer boxed)
+{
+  GByteArray *orig = boxed, *copy;
+
+  copy = g_byte_array_sized_new (orig->len);
+  g_byte_array_append (copy, orig->data, orig->len);
+  return copy;
+}
+
 static void
+byte_array_free (gpointer boxed)
+{
+  GByteArray *ba = boxed;
+
+  g_byte_array_free (ba, TRUE);
+}
+
+GType
+g_byte_array_get_type (void)
+{
+  static GType type_id = 0;
+  if (!type_id)
+    type_id = g_boxed_type_register_static (g_intern_static_string ("GByteArray"),
+					    byte_array_copy, byte_array_free);
+  return type_id;
+}
+
+static void
 boxed_proxy_value_init (GValue *value)
 {
   value->data[0].v_pointer = NULL;
Index: docs/reference/gobject/gobject-sections.txt
===================================================================
--- docs/reference/gobject/gobject-sections.txt	(revision 6285)
+++ docs/reference/gobject/gobject-sections.txt	(working copy)
@@ -340,6 +340,7 @@
 G_TYPE_GSTRING
 G_TYPE_STRV
 G_TYPE_REGEX
+G_TYPE_BYTE_ARRAY
 GStrv
 
 <SUBSECTION Standard>
Index: docs/reference/gobject/tmpl/gboxed.sgml
===================================================================
--- docs/reference/gobject/tmpl/gboxed.sgml	(revision 6285)
+++ docs/reference/gobject/tmpl/gboxed.sgml	(working copy)
@@ -147,6 +147,14 @@
 @Since: 2.14
 
 
+<!-- ##### MACRO G_TYPE_BYTE_ARRAY ##### -->
+<para>
+The #GType for a boxed type holding a #GByteArray.
+</para>
+
+@Since: 2.16
+
+
 <!-- ##### TYPEDEF GStrv ##### -->
 <para>
 A C representable type name for #G_TYPE_STRV.
