Index: gobject/gvaluetransform.c
===================================================================
--- gobject/gvaluetransform.c	(revision 7681)
+++ gobject/gvaluetransform.c	(working copy)
@@ -34,6 +34,8 @@
 {
   memcpy (&dest_value->data[0], &src_value->data[0], sizeof (src_value->data[0]));
 }
+#define value_transform_int16_int16     value_transform_memcpy_data0
+#define value_transform_uint16_uint16   value_transform_memcpy_data0
 #define value_transform_int_int         value_transform_memcpy_data0
 #define value_transform_uint_uint       value_transform_memcpy_data0
 #define value_transform_long_long       value_transform_memcpy_data0
@@ -54,8 +56,34 @@
   ctype c_value = src_value->data[0].from_member;                           \
   dest_value->data[0].to_member = c_value;                                  \
 } extern void glib_dummy_decl (void)
+DEFINE_CAST (int16_s8,            v_int16,    gint8,   v_int);
+DEFINE_CAST (int16_u8,            v_int16,    guint8,  v_uint);
+//DEFINE_CAST (int16_int16,         v_int16,    gint16,  v_int16);
+DEFINE_CAST (int16_uint16,        v_int16,    guint16, v_uint16);
+DEFINE_CAST (int16_int,           v_int16,    gint,    v_int);
+DEFINE_CAST (int16_uint,          v_int16,    guint,   v_uint);
+DEFINE_CAST (int16_long,          v_int16,    glong,   v_long);
+DEFINE_CAST (int16_ulong,         v_int16,    gulong,  v_ulong);
+DEFINE_CAST (int16_int64,         v_int16,    gint64,  v_int64);
+DEFINE_CAST (int16_uint64,        v_int16,    guint64, v_uint64);
+DEFINE_CAST (int16_float,         v_int16,    gfloat,  v_float);
+DEFINE_CAST (int16_double,        v_int16,    gdouble, v_double);
+DEFINE_CAST (uint16_s8,           v_uint16,   gint8,   v_int);
+DEFINE_CAST (uint16_u8,           v_uint16,   guint8,  v_uint);
+DEFINE_CAST (uint16_int16,        v_uint16,   gint16,  v_int16);
+//DEFINE_CAST (uint16_uint16,       v_uint16,   guint16, v_uint16);
+DEFINE_CAST (uint16_int,          v_uint16,   gint,    v_int);
+DEFINE_CAST (uint16_uint,         v_uint16,   guint,   v_uint);
+DEFINE_CAST (uint16_long,         v_uint16,   glong,   v_long);
+DEFINE_CAST (uint16_ulong,        v_uint16,   gulong,  v_ulong);
+DEFINE_CAST (uint16_int64,        v_uint16,   gint64,  v_int64);
+DEFINE_CAST (uint16_uint64,       v_uint16,   guint64, v_uint64);
+DEFINE_CAST (uint16_float,        v_uint16,   gfloat,  v_float);
+DEFINE_CAST (uint16_double,       v_uint16,   gdouble, v_double);
 DEFINE_CAST (int_s8,            v_int,    gint8,   v_int);
 DEFINE_CAST (int_u8,            v_int,    guint8,  v_uint);
+DEFINE_CAST (int_int16,         v_int,    gint16,  v_int16);
+DEFINE_CAST (int_uint16,        v_int,    guint16, v_uint16);
 DEFINE_CAST (int_uint,          v_int,    guint,   v_uint);
 DEFINE_CAST (int_long,          v_int,    glong,   v_long);
 DEFINE_CAST (int_ulong,         v_int,    gulong,  v_ulong);
@@ -65,6 +93,8 @@
 DEFINE_CAST (int_double,        v_int,    gdouble, v_double);
 DEFINE_CAST (uint_s8,           v_uint,   gint8,   v_int);
 DEFINE_CAST (uint_u8,           v_uint,   guint8,  v_uint);
+DEFINE_CAST (uint_int16,        v_uint,   gint16,  v_int16);
+DEFINE_CAST (uint_uint16,       v_uint,   guint16, v_uint16);
 DEFINE_CAST (uint_int,          v_uint,   gint,    v_int);
 DEFINE_CAST (uint_long,         v_uint,   glong,   v_long);
 DEFINE_CAST (uint_ulong,        v_uint,   gulong,  v_ulong);
@@ -74,6 +104,8 @@
 DEFINE_CAST (uint_double,       v_uint,   gdouble, v_double);
 DEFINE_CAST (long_s8,           v_long,   gint8,   v_int);
 DEFINE_CAST (long_u8,           v_long,   guint8,  v_uint);
+DEFINE_CAST (long_int16,        v_long,   gint16,  v_int16);
+DEFINE_CAST (long_uint16,       v_long,   guint16, v_uint16);
 DEFINE_CAST (long_int,          v_long,   gint,    v_int);
 DEFINE_CAST (long_uint,         v_long,   guint,   v_uint);
 DEFINE_CAST (long_ulong,        v_long,   gulong,  v_ulong);
@@ -83,6 +115,8 @@
 DEFINE_CAST (long_double,       v_long,   gdouble, v_double);
 DEFINE_CAST (ulong_s8,          v_ulong,  gint8,   v_int);
 DEFINE_CAST (ulong_u8,          v_ulong,  guint8,  v_uint);
+DEFINE_CAST (ulong_int16,       v_ulong,  gint16,  v_int16);
+DEFINE_CAST (ulong_uint16,      v_ulong,  guint16, v_uint16);
 DEFINE_CAST (ulong_int,         v_ulong,  gint,    v_int);
 DEFINE_CAST (ulong_uint,        v_ulong,  guint,   v_uint);
 DEFINE_CAST (ulong_int64,       v_ulong,  gint64,  v_int64);
@@ -92,6 +126,8 @@
 DEFINE_CAST (ulong_double,      v_ulong,  gdouble, v_double);
 DEFINE_CAST (int64_s8,          v_int64,  gint8,   v_int);
 DEFINE_CAST (int64_u8,          v_int64,  guint8,  v_uint);
+DEFINE_CAST (int64_int16,       v_int64,  gint16,  v_int16);
+DEFINE_CAST (int64_uint16,      v_int64,  guint16, v_uint16);
 DEFINE_CAST (int64_int,         v_int64,  gint,    v_int);
 DEFINE_CAST (int64_uint,        v_int64,  guint,   v_uint);
 DEFINE_CAST (int64_long,        v_int64,  glong,   v_long);
@@ -101,6 +137,8 @@
 DEFINE_CAST (int64_double,      v_int64,  gdouble, v_double);
 DEFINE_CAST (uint64_s8,         v_uint64, gint8,   v_int);
 DEFINE_CAST (uint64_u8,         v_uint64, guint8,  v_uint);
+DEFINE_CAST (uint64_int16,      v_uint64, gint16,  v_int16);
+DEFINE_CAST (uint64_uint16,     v_uint64, guint16, v_uint16);
 DEFINE_CAST (uint64_int,        v_uint64, gint,    v_int);
 DEFINE_CAST (uint64_uint,       v_uint64, guint,   v_uint);
 DEFINE_CAST (uint64_long,       v_uint64, glong,   v_long);
@@ -118,6 +156,8 @@
 #endif
 DEFINE_CAST (float_s8,          v_float,  gint8,   v_int);
 DEFINE_CAST (float_u8,          v_float,  guint8,  v_uint);
+DEFINE_CAST (float_int16,       v_float,  gint16,  v_int16);
+DEFINE_CAST (float_uint16,      v_float,  guint16, v_uint16);
 DEFINE_CAST (float_int,         v_float,  gint,    v_int);
 DEFINE_CAST (float_uint,        v_float,  guint,   v_uint);
 DEFINE_CAST (float_long,        v_float,  glong,   v_long);
@@ -127,6 +167,8 @@
 DEFINE_CAST (float_double,      v_float,  gdouble, v_double);
 DEFINE_CAST (double_s8,         v_double, gint8,   v_int);
 DEFINE_CAST (double_u8,         v_double, guint8,  v_uint);
+DEFINE_CAST (double_int16,      v_double, gint16,  v_int16);
+DEFINE_CAST (double_uint16,     v_double, guint16, v_uint16);
 DEFINE_CAST (double_int,        v_double, gint,    v_int);
 DEFINE_CAST (double_uint,       v_double, guint,   v_uint);
 DEFINE_CAST (double_long,       v_double, glong,   v_long);
@@ -145,6 +187,8 @@
 {                                                                           \
   dest_value->data[0].v_int = src_value->data[0].from_member != 0;  \
 } extern void glib_dummy_decl (void)
+DEFINE_BOOL_CHECK (int16_bool,  v_int16);
+DEFINE_BOOL_CHECK (uint16_bool, v_uint16);
 DEFINE_BOOL_CHECK (int_bool,    v_int);
 DEFINE_BOOL_CHECK (uint_bool,   v_uint);
 DEFINE_BOOL_CHECK (long_bool,   v_long);
@@ -163,6 +207,8 @@
   dest_value->data[0].v_pointer = g_strdup_printf ((format),                \
 						   src_value->data[0].from_member);             \
 } extern void glib_dummy_decl (void)
+DEFINE_SPRINTF (int16_string,   v_int16,  "%" G_GINT16_FORMAT);
+DEFINE_SPRINTF (uint16_string,  v_uint16, "%" G_GUINT16_FORMAT);
 DEFINE_SPRINTF (int_string,     v_int,    "%d");
 DEFINE_SPRINTF (uint_string,    v_uint,   "%u");
 DEFINE_SPRINTF (long_string,    v_long,   "%ld");
@@ -256,6 +302,8 @@
   g_value_register_transform_func (G_TYPE_CHAR,         G_TYPE_CHAR,            value_transform_int_int);
   g_value_register_transform_func (G_TYPE_CHAR,         G_TYPE_UCHAR,           value_transform_int_u8);
   g_value_register_transform_func (G_TYPE_CHAR,         G_TYPE_BOOLEAN,         value_transform_int_bool);
+  g_value_register_transform_func (G_TYPE_CHAR,         G_TYPE_INT16,           value_transform_int_int16);
+  g_value_register_transform_func (G_TYPE_CHAR,         G_TYPE_UINT16,          value_transform_int_uint16);
   g_value_register_transform_func (G_TYPE_CHAR,         G_TYPE_INT,             value_transform_int_int);
   g_value_register_transform_func (G_TYPE_CHAR,         G_TYPE_UINT,            value_transform_int_uint);
   g_value_register_transform_func (G_TYPE_CHAR,         G_TYPE_LONG,            value_transform_int_long);
@@ -270,6 +318,8 @@
   g_value_register_transform_func (G_TYPE_UCHAR,        G_TYPE_CHAR,            value_transform_uint_s8);
   g_value_register_transform_func (G_TYPE_UCHAR,        G_TYPE_UCHAR,           value_transform_uint_uint);
   g_value_register_transform_func (G_TYPE_UCHAR,        G_TYPE_BOOLEAN,         value_transform_uint_bool);
+  g_value_register_transform_func (G_TYPE_UCHAR,        G_TYPE_INT16,           value_transform_uint_int16);
+  g_value_register_transform_func (G_TYPE_UCHAR,        G_TYPE_UINT16,          value_transform_uint_uint16);
   g_value_register_transform_func (G_TYPE_UCHAR,        G_TYPE_INT,             value_transform_uint_int);
   g_value_register_transform_func (G_TYPE_UCHAR,        G_TYPE_UINT,            value_transform_uint_uint);
   g_value_register_transform_func (G_TYPE_UCHAR,        G_TYPE_LONG,            value_transform_uint_long);
@@ -284,6 +334,8 @@
   g_value_register_transform_func (G_TYPE_BOOLEAN,      G_TYPE_CHAR,            value_transform_int_s8);
   g_value_register_transform_func (G_TYPE_BOOLEAN,      G_TYPE_UCHAR,           value_transform_int_u8);
   g_value_register_transform_func (G_TYPE_BOOLEAN,      G_TYPE_BOOLEAN,         value_transform_int_int);
+  g_value_register_transform_func (G_TYPE_BOOLEAN,      G_TYPE_INT16,           value_transform_int_int16);
+  g_value_register_transform_func (G_TYPE_BOOLEAN,      G_TYPE_UINT16,          value_transform_int_uint16);
   g_value_register_transform_func (G_TYPE_BOOLEAN,      G_TYPE_INT,             value_transform_int_int);
   g_value_register_transform_func (G_TYPE_BOOLEAN,      G_TYPE_UINT,            value_transform_int_uint);
   g_value_register_transform_func (G_TYPE_BOOLEAN,      G_TYPE_LONG,            value_transform_int_long);
@@ -295,9 +347,46 @@
   SKIP____register_transform_func (G_TYPE_BOOLEAN,      G_TYPE_FLOAT,           value_transform_int_float);
   SKIP____register_transform_func (G_TYPE_BOOLEAN,      G_TYPE_DOUBLE,          value_transform_int_double);
   g_value_register_transform_func (G_TYPE_BOOLEAN,      G_TYPE_STRING,          value_transform_bool_string);
+  g_value_register_transform_func (G_TYPE_INT16,        G_TYPE_CHAR,            value_transform_int16_s8);
+  g_value_register_transform_func (G_TYPE_INT16,        G_TYPE_UCHAR,           value_transform_int16_u8);
+  g_value_register_transform_func (G_TYPE_INT16,        G_TYPE_BOOLEAN,         value_transform_int16_bool);
+  g_value_register_transform_func (G_TYPE_INT16,        G_TYPE_INT,             value_transform_int16_int);
+  g_value_register_transform_func (G_TYPE_INT16,        G_TYPE_UINT,            value_transform_int16_uint);
+  g_value_register_transform_func (G_TYPE_INT16,        G_TYPE_INT16,           value_transform_int16_int16);
+  g_value_register_transform_func (G_TYPE_INT16,        G_TYPE_UINT16,          value_transform_int16_uint16);
+  g_value_register_transform_func (G_TYPE_INT16,        G_TYPE_LONG,            value_transform_int16_long);
+  g_value_register_transform_func (G_TYPE_INT16,        G_TYPE_ULONG,           value_transform_int16_ulong);
+  g_value_register_transform_func (G_TYPE_INT16,        G_TYPE_INT64,           value_transform_int16_int64);
+  g_value_register_transform_func (G_TYPE_INT16,        G_TYPE_UINT64,          value_transform_int16_uint64);
+  g_value_register_transform_func (G_TYPE_INT16,        G_TYPE_ENUM,            value_transform_int16_long);
+  g_value_register_transform_func (G_TYPE_INT16,        G_TYPE_FLAGS,           value_transform_int16_ulong);
+  g_value_register_transform_func (G_TYPE_INT16,        G_TYPE_FLOAT,           value_transform_int16_float);
+  g_value_register_transform_func (G_TYPE_INT16,        G_TYPE_DOUBLE,          value_transform_int16_double);
+  g_value_register_transform_func (G_TYPE_INT16,        G_TYPE_STRING,          value_transform_int16_string);
+  g_value_register_transform_func (G_TYPE_UINT16,       G_TYPE_CHAR,            value_transform_uint16_s8);
+  g_value_register_transform_func (G_TYPE_UINT16,       G_TYPE_UCHAR,           value_transform_uint16_u8);
+  g_value_register_transform_func (G_TYPE_UINT16,       G_TYPE_BOOLEAN,         value_transform_uint16_bool);
+  g_value_register_transform_func (G_TYPE_UINT16,       G_TYPE_INT16,           value_transform_uint16_int16);
+  g_value_register_transform_func (G_TYPE_UINT16,       G_TYPE_UINT16,          value_transform_uint16_uint16);
+  g_value_register_transform_func (G_TYPE_UINT16,       G_TYPE_INT,             value_transform_uint16_int);
+  g_value_register_transform_func (G_TYPE_UINT16,       G_TYPE_UINT,            value_transform_uint16_uint);
+  g_value_register_transform_func (G_TYPE_UINT16,       G_TYPE_LONG,            value_transform_uint16_long);
+  g_value_register_transform_func (G_TYPE_UINT16,       G_TYPE_ULONG,           value_transform_uint16_ulong);
+  g_value_register_transform_func (G_TYPE_UINT16,       G_TYPE_INT64,           value_transform_uint16_int64);
+  g_value_register_transform_func (G_TYPE_UINT16,       G_TYPE_UINT64,          value_transform_uint16_uint64);
+  g_value_register_transform_func (G_TYPE_UINT16,       G_TYPE_ENUM,            value_transform_uint16_long);
+  g_value_register_transform_func (G_TYPE_UINT16,       G_TYPE_FLAGS,           value_transform_uint16_ulong);
+#ifndef _MSC_VER
+  /* required casts unsupported with msvc 5.0 */
+  g_value_register_transform_func (G_TYPE_UINT16,       G_TYPE_FLOAT,           value_transform_uint16_float);
+  g_value_register_transform_func (G_TYPE_UINT16,       G_TYPE_DOUBLE,          value_transform_uint16_double);
+#endif
+  g_value_register_transform_func (G_TYPE_UINT16,       G_TYPE_STRING,          value_transform_uint16_string);
   g_value_register_transform_func (G_TYPE_INT,          G_TYPE_CHAR,            value_transform_int_s8);
   g_value_register_transform_func (G_TYPE_INT,          G_TYPE_UCHAR,           value_transform_int_u8);
   g_value_register_transform_func (G_TYPE_INT,          G_TYPE_BOOLEAN,         value_transform_int_bool);
+  g_value_register_transform_func (G_TYPE_INT,          G_TYPE_INT16,           value_transform_int_int16);
+  g_value_register_transform_func (G_TYPE_INT,          G_TYPE_UINT16,          value_transform_int_uint16);
   g_value_register_transform_func (G_TYPE_INT,          G_TYPE_INT,             value_transform_int_int);
   g_value_register_transform_func (G_TYPE_INT,          G_TYPE_UINT,            value_transform_int_uint);
   g_value_register_transform_func (G_TYPE_INT,          G_TYPE_LONG,            value_transform_int_long);
@@ -312,6 +401,8 @@
   g_value_register_transform_func (G_TYPE_UINT,         G_TYPE_CHAR,            value_transform_uint_s8);
   g_value_register_transform_func (G_TYPE_UINT,         G_TYPE_UCHAR,           value_transform_uint_u8);
   g_value_register_transform_func (G_TYPE_UINT,         G_TYPE_BOOLEAN,         value_transform_uint_bool);
+  g_value_register_transform_func (G_TYPE_UINT,         G_TYPE_INT16,           value_transform_uint_int16);
+  g_value_register_transform_func (G_TYPE_UINT,         G_TYPE_UINT16,          value_transform_uint_uint16);
   g_value_register_transform_func (G_TYPE_UINT,         G_TYPE_INT,             value_transform_uint_int);
   g_value_register_transform_func (G_TYPE_UINT,         G_TYPE_UINT,            value_transform_uint_uint);
   g_value_register_transform_func (G_TYPE_UINT,         G_TYPE_LONG,            value_transform_uint_long);
@@ -326,6 +417,8 @@
   g_value_register_transform_func (G_TYPE_LONG,         G_TYPE_CHAR,            value_transform_long_s8);
   g_value_register_transform_func (G_TYPE_LONG,         G_TYPE_UCHAR,           value_transform_long_u8);
   g_value_register_transform_func (G_TYPE_LONG,         G_TYPE_BOOLEAN,         value_transform_long_bool);
+  g_value_register_transform_func (G_TYPE_LONG,         G_TYPE_INT16,           value_transform_long_int16);
+  g_value_register_transform_func (G_TYPE_LONG,         G_TYPE_UINT16,          value_transform_long_uint16);
   g_value_register_transform_func (G_TYPE_LONG,         G_TYPE_INT,             value_transform_long_int);
   g_value_register_transform_func (G_TYPE_LONG,         G_TYPE_UINT,            value_transform_long_uint);
   g_value_register_transform_func (G_TYPE_LONG,         G_TYPE_LONG,            value_transform_long_long);
@@ -340,6 +433,8 @@
   g_value_register_transform_func (G_TYPE_ULONG,        G_TYPE_CHAR,            value_transform_ulong_s8);
   g_value_register_transform_func (G_TYPE_ULONG,        G_TYPE_UCHAR,           value_transform_ulong_u8);
   g_value_register_transform_func (G_TYPE_ULONG,        G_TYPE_BOOLEAN,         value_transform_ulong_bool);
+  g_value_register_transform_func (G_TYPE_ULONG,        G_TYPE_INT16,           value_transform_ulong_int16);
+  g_value_register_transform_func (G_TYPE_ULONG,        G_TYPE_UINT16,          value_transform_ulong_uint16);
   g_value_register_transform_func (G_TYPE_ULONG,        G_TYPE_INT,             value_transform_ulong_int);
   g_value_register_transform_func (G_TYPE_ULONG,        G_TYPE_UINT,            value_transform_ulong_uint);
   g_value_register_transform_func (G_TYPE_ULONG,        G_TYPE_LONG,            value_transform_ulong_long);
@@ -356,6 +451,8 @@
   g_value_register_transform_func (G_TYPE_INT64,        G_TYPE_BOOLEAN,         value_transform_int64_bool);
   g_value_register_transform_func (G_TYPE_INT64,        G_TYPE_INT,             value_transform_int64_int);
   g_value_register_transform_func (G_TYPE_INT64,        G_TYPE_UINT,            value_transform_int64_uint);
+  g_value_register_transform_func (G_TYPE_INT64,        G_TYPE_INT16,           value_transform_int64_int16);
+  g_value_register_transform_func (G_TYPE_INT64,        G_TYPE_UINT16,          value_transform_int64_uint16);
   g_value_register_transform_func (G_TYPE_INT64,        G_TYPE_LONG,            value_transform_int64_long);
   g_value_register_transform_func (G_TYPE_INT64,        G_TYPE_ULONG,           value_transform_int64_ulong);
   g_value_register_transform_func (G_TYPE_INT64,        G_TYPE_INT64,           value_transform_int64_int64);
@@ -368,6 +465,8 @@
   g_value_register_transform_func (G_TYPE_UINT64,       G_TYPE_CHAR,            value_transform_uint64_s8);
   g_value_register_transform_func (G_TYPE_UINT64,       G_TYPE_UCHAR,           value_transform_uint64_u8);
   g_value_register_transform_func (G_TYPE_UINT64,       G_TYPE_BOOLEAN,         value_transform_uint64_bool);
+  g_value_register_transform_func (G_TYPE_UINT64,       G_TYPE_INT16,           value_transform_uint64_int16);
+  g_value_register_transform_func (G_TYPE_UINT64,       G_TYPE_UINT16,          value_transform_uint64_uint16);
   g_value_register_transform_func (G_TYPE_UINT64,       G_TYPE_INT,             value_transform_uint64_int);
   g_value_register_transform_func (G_TYPE_UINT64,       G_TYPE_UINT,            value_transform_uint64_uint);
   g_value_register_transform_func (G_TYPE_UINT64,       G_TYPE_LONG,            value_transform_uint64_long);
@@ -385,6 +484,8 @@
   g_value_register_transform_func (G_TYPE_ENUM,         G_TYPE_CHAR,            value_transform_long_s8);
   g_value_register_transform_func (G_TYPE_ENUM,         G_TYPE_UCHAR,           value_transform_long_u8);
   SKIP____register_transform_func (G_TYPE_ENUM,         G_TYPE_BOOLEAN,         value_transform_long_bool);
+  g_value_register_transform_func (G_TYPE_ENUM,         G_TYPE_INT16,           value_transform_long_int16);
+  g_value_register_transform_func (G_TYPE_ENUM,         G_TYPE_UINT16,          value_transform_long_uint16);
   g_value_register_transform_func (G_TYPE_ENUM,         G_TYPE_INT,             value_transform_long_int);
   g_value_register_transform_func (G_TYPE_ENUM,         G_TYPE_UINT,            value_transform_long_uint);
   g_value_register_transform_func (G_TYPE_ENUM,         G_TYPE_LONG,            value_transform_long_long);
@@ -399,6 +500,8 @@
   g_value_register_transform_func (G_TYPE_FLAGS,        G_TYPE_CHAR,            value_transform_ulong_s8);
   g_value_register_transform_func (G_TYPE_FLAGS,        G_TYPE_UCHAR,           value_transform_ulong_u8);
   SKIP____register_transform_func (G_TYPE_FLAGS,        G_TYPE_BOOLEAN,         value_transform_ulong_bool);
+  g_value_register_transform_func (G_TYPE_FLAGS,        G_TYPE_INT16,           value_transform_ulong_int16);
+  g_value_register_transform_func (G_TYPE_FLAGS,        G_TYPE_UINT16,          value_transform_ulong_uint16);
   g_value_register_transform_func (G_TYPE_FLAGS,        G_TYPE_INT,             value_transform_ulong_int);
   g_value_register_transform_func (G_TYPE_FLAGS,        G_TYPE_UINT,            value_transform_ulong_uint);
   g_value_register_transform_func (G_TYPE_FLAGS,        G_TYPE_LONG,            value_transform_ulong_long);
@@ -413,6 +516,8 @@
   g_value_register_transform_func (G_TYPE_FLOAT,        G_TYPE_CHAR,            value_transform_float_s8);
   g_value_register_transform_func (G_TYPE_FLOAT,        G_TYPE_UCHAR,           value_transform_float_u8);
   SKIP____register_transform_func (G_TYPE_FLOAT,        G_TYPE_BOOLEAN,         value_transform_float_bool);
+  g_value_register_transform_func (G_TYPE_FLOAT,        G_TYPE_INT16,           value_transform_float_int16);
+  g_value_register_transform_func (G_TYPE_FLOAT,        G_TYPE_UINT16,          value_transform_float_uint16);
   g_value_register_transform_func (G_TYPE_FLOAT,        G_TYPE_INT,             value_transform_float_int);
   g_value_register_transform_func (G_TYPE_FLOAT,        G_TYPE_UINT,            value_transform_float_uint);
   g_value_register_transform_func (G_TYPE_FLOAT,        G_TYPE_LONG,            value_transform_float_long);
@@ -427,6 +532,8 @@
   g_value_register_transform_func (G_TYPE_DOUBLE,       G_TYPE_CHAR,            value_transform_double_s8);
   g_value_register_transform_func (G_TYPE_DOUBLE,       G_TYPE_UCHAR,           value_transform_double_u8);
   SKIP____register_transform_func (G_TYPE_DOUBLE,       G_TYPE_BOOLEAN,         value_transform_double_bool);
+  g_value_register_transform_func (G_TYPE_DOUBLE,       G_TYPE_INT16,           value_transform_double_int16);
+  g_value_register_transform_func (G_TYPE_DOUBLE,       G_TYPE_UINT16,          value_transform_double_uint16);
   g_value_register_transform_func (G_TYPE_DOUBLE,       G_TYPE_INT,             value_transform_double_int);
   g_value_register_transform_func (G_TYPE_DOUBLE,       G_TYPE_UINT,            value_transform_double_uint);
   g_value_register_transform_func (G_TYPE_DOUBLE,       G_TYPE_LONG,            value_transform_double_long);
Index: gobject/gparamspecs.c
===================================================================
--- gobject/gparamspecs.c	(revision 7681)
+++ gobject/gparamspecs.c	(working copy)
@@ -133,6 +133,86 @@
 }
 
 static void
+param_int16_init (GParamSpec *pspec)
+{
+  GParamSpecInt16 *lspec = G_PARAM_SPEC_INT16 (pspec);
+  
+  lspec->minimum = G_MININT16;
+  lspec->maximum = G_MAXINT16;
+  lspec->default_value = 0;
+}
+
+static void
+param_int16_set_default (GParamSpec *pspec,
+			GValue     *value)
+{
+  value->data[0].v_int16 = G_PARAM_SPEC_INT16 (pspec)->default_value;
+}
+
+static gboolean
+param_int16_validate (GParamSpec *pspec,
+		     GValue     *value)
+{
+  GParamSpecInt16 *lspec = G_PARAM_SPEC_INT16 (pspec);
+  gint16 oval = value->data[0].v_int16;
+  
+  value->data[0].v_int16 = CLAMP (value->data[0].v_int16, lspec->minimum, lspec->maximum);
+  
+  return value->data[0].v_int16 != oval;
+}
+
+static gint
+param_int16_values_cmp (GParamSpec   *pspec,
+		       const GValue *value1,
+		       const GValue *value2)
+{
+  if (value1->data[0].v_int16 < value2->data[0].v_int16)
+    return -1;
+  else
+    return value1->data[0].v_int16 > value2->data[0].v_int16;
+}
+
+static void
+param_uint16_init (GParamSpec *pspec)
+{
+  GParamSpecUInt16 *uspec = G_PARAM_SPEC_UINT16 (pspec);
+  
+  uspec->minimum = 0;
+  uspec->maximum = G_MAXUINT16;
+  uspec->default_value = 0;
+}
+
+static void
+param_uint16_set_default (GParamSpec *pspec,
+			 GValue     *value)
+{
+  value->data[0].v_uint16 = G_PARAM_SPEC_UINT16 (pspec)->default_value;
+}
+
+static gboolean
+param_uint16_validate (GParamSpec *pspec,
+		      GValue     *value)
+{
+  GParamSpecUInt16 *uspec = G_PARAM_SPEC_UINT16 (pspec);
+  guint16 oval = value->data[0].v_uint16;
+  
+  value->data[0].v_uint16 = CLAMP (value->data[0].v_uint16, uspec->minimum, uspec->maximum);
+  
+  return value->data[0].v_uint16 != oval;
+}
+
+static gint
+param_uint16_values_cmp (GParamSpec   *pspec,
+			const GValue *value1,
+			const GValue *value2)
+{
+  if (value1->data[0].v_uint16 < value2->data[0].v_uint16)
+    return -1;
+  else
+    return value1->data[0].v_uint16 > value2->data[0].v_uint16;
+}
+
+static void
 param_int_init (GParamSpec *pspec)
 {
   GParamSpecInt *ispec = G_PARAM_SPEC_INT (pspec);
@@ -1104,7 +1184,7 @@
 void
 g_param_spec_types_init (void)	
 {
-  const guint n_types = 22;
+  const guint n_types = 24;
   GType type, *spec_types, *spec_types_bound;
 
   g_param_spec_types = g_new0 (GType, n_types);
@@ -1509,6 +1589,43 @@
     g_assert (type == G_TYPE_PARAM_GTYPE);
   }
 
+  /* G_TYPE_PARAM_INT16
+   */
+  {
+    static const GParamSpecTypeInfo pspec_info = {
+      sizeof (GParamSpecInt16),  /* instance_size */
+      16,                       /* n_preallocs */
+      param_int16_init,         /* instance_init */
+      G_TYPE_INT16,		/* value_type */
+      NULL,			/* finalize */
+      param_int16_set_default,	/* value_set_default */
+      param_int16_validate,	/* value_validate */
+      param_int16_values_cmp,	/* values_cmp */
+    };
+    type = g_param_type_register_static (g_intern_static_string ("GParamInt16"), &pspec_info);
+    *spec_types++ = type;
+    g_assert (type == G_TYPE_PARAM_INT16);
+  }
+  
+  /* G_TYPE_PARAM_UINT16
+   */
+  {
+    static const GParamSpecTypeInfo pspec_info = {
+      sizeof (GParamSpecUInt16), /* instance_size */
+      16,                       /* n_preallocs */
+      param_uint16_init,        /* instance_init */
+      G_TYPE_UINT16,		/* value_type */
+      NULL,			/* finalize */
+      param_uint16_set_default,	/* value_set_default */
+      param_uint16_validate,	/* value_validate */
+      param_uint16_values_cmp,	/* values_cmp */
+    };
+    type = g_param_type_register_static (g_intern_static_string ("GParamUInt16"), &pspec_info);
+    *spec_types++ = type;
+    g_assert (type == G_TYPE_PARAM_UINT16);
+  }
+
+
   g_assert (spec_types == spec_types_bound);
 }
 
@@ -1632,6 +1749,95 @@
 }
 
 /**
+ * g_param_spec_int16:
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecInt16 instance specifying a %G_TYPE_INT16 property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: a newly created parameter specification
+ *
+ * Since: 2.20
+ */
+GParamSpec*
+g_param_spec_int16 (const gchar *name,
+		    const gchar *nick,
+		    const gchar *blurb,
+		    gint16	 minimum,
+		    gint16	 maximum,
+		    gint16	 default_value,
+		    GParamFlags	 flags)
+{
+  GParamSpecInt16 *lspec;
+  
+  g_return_val_if_fail (default_value >= minimum && default_value <= maximum, NULL);
+
+  lspec = g_param_spec_internal (G_TYPE_PARAM_INT16,
+				 name,
+				 nick,
+				 blurb,
+				 flags);
+  
+  lspec->minimum = minimum;
+  lspec->maximum = maximum;
+  lspec->default_value = default_value;
+  
+  return G_PARAM_SPEC (lspec);
+}
+
+/**
+ * g_param_spec_uint16:
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecUInt16 instance specifying a %G_TYPE_UINT16
+ * property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: a newly created parameter specification
+ *
+ * Since: 2.20
+ */
+GParamSpec*
+g_param_spec_uint16 (const gchar *name,
+		     const gchar *nick,
+		     const gchar *blurb,
+		     guint16	  minimum,
+		     guint16	  maximum,
+		     guint16	  default_value,
+		     GParamFlags  flags)
+{
+  GParamSpecUInt16 *uspec;
+  
+  g_return_val_if_fail (default_value >= minimum && default_value <= maximum, NULL);
+  
+  uspec = g_param_spec_internal (G_TYPE_PARAM_UINT16,
+				 name,
+				 nick,
+				 blurb,
+				 flags);
+  
+  uspec->minimum = minimum;
+  uspec->maximum = maximum;
+  uspec->default_value = default_value;
+  
+  return G_PARAM_SPEC (uspec);
+}
+
+/**
  * g_param_spec_int:
  * @name: canonical name of the property specified
  * @nick: nick name for the property specified
Index: gobject/ChangeLog
===================================================================
--- gobject/ChangeLog	(revision 7681)
+++ gobject/ChangeLog	(working copy)
@@ -1,3 +1,26 @@
+2008-11-27  David Zeuthen  <davidz@redhat.com>
+
+	Bug 562498 – fundamental types for gint16/guint16
+
+	* glib-genmarshal.c: (put_marshal_value_getters),
+	(complete_in_arg), (complete_out_arg):
+	* gparamspecs.c: (param_int16_init), (param_int16_set_default),
+	(param_int16_validate), (param_int16_values_cmp),
+	(param_uint16_init), (param_uint16_set_default),
+	(param_uint16_validate), (param_uint16_values_cmp),
+	(g_param_spec_types_init), (g_param_spec_int16),
+	(g_param_spec_uint16):
+	* gparamspecs.h:
+	* gtype.h:
+	* gvalue.h:
+	* gvaluetransform.c: (g_value_transforms_init):
+	* gvaluetypes.c: (value_init_int16), (value_copy_int16),
+	(value_collect_int16), (value_lcopy_int16), (g_value_types_init),
+	(g_value_set_int16), (g_value_get_int16), (g_value_set_uint16),
+	(g_value_get_uint16):
+	* gvaluetypes.h:
+	Teach the type system about gint16/guint16.
+
 2008-11-03  Matthias Clasen <mclasen@redhat.com>
 
 	Bug 555935 – Clear the mechanism of overwriting properties
Index: gobject/gvaluetypes.c
===================================================================
--- gobject/gvaluetypes.c	(revision 7681)
+++ gobject/gvaluetypes.c	(working copy)
@@ -81,7 +81,47 @@
   return NULL;
 }
 
+static void
+value_init_int16 (GValue *value)
+{
+  value->data[0].v_int = 0;
+}
+
+static void
+value_copy_int16 (const GValue *src_value,
+		  GValue       *dest_value)
+{
+  dest_value->data[0].v_int16 = src_value->data[0].v_int;
+}
+
 static gchar*
+value_collect_int16 (GValue      *value,
+		     guint        n_collect_values,
+		     GTypeCValue *collect_values,
+		     guint        collect_flags)
+{
+  value->data[0].v_int16 = collect_values[0].v_int;
+  
+  return NULL;
+}
+
+static gchar*
+value_lcopy_int16 (const GValue *value,
+		   guint         n_collect_values,
+		   GTypeCValue  *collect_values,
+		   guint         collect_flags)
+{
+  gint16 *int16_p = collect_values[0].v_pointer;
+  
+  if (!int16_p)
+    return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+  
+  *int16_p = value->data[0].v_int16;
+  
+  return NULL;
+}
+
+static gchar*
 value_collect_int (GValue      *value,
 		   guint        n_collect_values,
 		   GTypeCValue *collect_values,
@@ -550,6 +590,26 @@
     type = g_type_register_fundamental (G_TYPE_POINTER, g_intern_static_string ("gpointer"), &info, &finfo, 0);
     g_assert (type == G_TYPE_POINTER);
   }
+
+  /* G_TYPE_INT16 / G_TYPE_UINT16
+   */
+  {
+    static const GTypeValueTable value_table = {
+      value_init_int16,		/* value_init */
+      NULL,			/* value_free */
+      value_copy_int16,		/* value_copy */
+      NULL,                     /* value_peek_pointer */
+      "q",			/* collect_format */
+      value_collect_int16,	/* collect_value */
+      "p",			/* lcopy_format */
+      value_lcopy_int16,	/* lcopy_value */
+    };
+    info.value_table = &value_table;
+    type = g_type_register_fundamental (G_TYPE_INT16, g_intern_static_string ("gint16"), &info, &finfo, 0);
+    g_assert (type == G_TYPE_INT16);
+    type = g_type_register_fundamental (G_TYPE_UINT16, g_intern_static_string ("guint16"), &info, &finfo, 0);
+    g_assert (type == G_TYPE_UINT16);
+  }
 }
 
 
@@ -651,6 +711,78 @@
 }
 
 /**
+ * g_value_get_int16:
+ * @value: a valid #GValue of type %G_TYPE_INT16
+ *
+ * Get the contents of a %G_TYPE_INT16 #GValue.
+ *
+ * Returns: 16bit integer contents of @value
+ *
+ * Since: 2.20
+ */
+void
+g_value_set_int16 (GValue *value,
+		   gint16  v_int16)
+{
+  g_return_if_fail (G_VALUE_HOLDS_INT16 (value));
+  
+  value->data[0].v_int16 = v_int16;
+}
+
+/**
+ * g_value_set_int16:
+ * @value: a valid #GValue of type %G_TYPE_INT16
+ * @v_int16: 16bit integer value to be set
+ *
+ * Set the contents of a %G_TYPE_INT16 #GValue to @v_int16.
+ *
+ * Since: 2.20
+ */
+gint16
+g_value_get_int16 (const GValue *value)
+{
+  g_return_val_if_fail (G_VALUE_HOLDS_INT16 (value), 0);
+  
+  return value->data[0].v_int16;
+}
+
+/**
+ * g_value_set_uint16:
+ * @value: a valid #GValue of type %G_TYPE_UINT16
+ * @v_uint16: unsigned 16bit integer value to be set
+ *
+ * Set the contents of a %G_TYPE_UINT16 #GValue to @v_uint16.
+ *
+ * Since: 2.20
+ */
+void
+g_value_set_uint16 (GValue *value,
+		    guint16 v_uint16)
+{
+  g_return_if_fail (G_VALUE_HOLDS_UINT16 (value));
+  
+  value->data[0].v_uint16 = v_uint16;
+}
+
+/**
+ * g_value_get_uint16:
+ * @value: a valid #GValue of type %G_TYPE_UINT16
+ *
+ * Get the contents of a %G_TYPE_UINT16 #GValue.
+ *
+ * Returns: unsigned 16bit integer contents of @value
+ *
+ * Since: 2.20
+ */
+guint16
+g_value_get_uint16 (const GValue *value)
+{
+  g_return_val_if_fail (G_VALUE_HOLDS_UINT16 (value), 0);
+  
+  return value->data[0].v_uint16;
+}
+
+/**
  * g_value_set_int:
  * @value: a valid #GValue of type %G_TYPE_INT
  * @v_int: integer value to be set
Index: gobject/gparamspecs.h
===================================================================
--- gobject/gparamspecs.h	(revision 7681)
+++ gobject/gparamspecs.h	(working copy)
@@ -103,6 +103,64 @@
 #define G_PARAM_SPEC_BOOLEAN(pspec)        (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_BOOLEAN, GParamSpecBoolean))
 
 /**
+ * G_TYPE_PARAM_INT16:
+ * 
+ * The #GType of #GParamSpecInt16.
+ *
+ * Since: 2.20
+ */
+#define	G_TYPE_PARAM_INT16		   (g_param_spec_types[22])
+/**
+ * G_IS_PARAM_SPEC_INT16:
+ * @pspec: a valid #GParamSpec instance
+ * 
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT16.
+ *
+ * Returns: %TRUE on success.
+ *
+ * Since: 2.20
+ */
+#define G_IS_PARAM_SPEC_INT16(pspec)       (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_INT16))
+/**
+ * G_PARAM_SPEC_INT16:
+ * @pspec: a valid #GParamSpec instance
+ * 
+ * Cast a #GParamSpec instance into a #GParamSpecInt16.
+ *
+ * Since: 2.20
+ */
+#define G_PARAM_SPEC_INT16(pspec)          (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT16, GParamSpecInt16))
+
+/**
+ * G_TYPE_PARAM_UINT16:
+ * 
+ * The #GType of #GParamSpecUInt16.
+ *
+ * Since: 2.20
+ */
+#define	G_TYPE_PARAM_UINT16		   (g_param_spec_types[23])
+/**
+ * G_IS_PARAM_SPEC_UINT16:
+ * @pspec: a valid #GParamSpec instance
+ * 
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT16.
+ * 
+ * Returns: %TRUE on success.
+ *
+ * Since: 2.20
+ */
+#define G_IS_PARAM_SPEC_UINT16(pspec)      (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UINT16))
+/**
+ * G_PARAM_SPEC_UINT16:
+ * @pspec: a valid #GParamSpec instance
+ * 
+ * Cast a #GParamSpec instance into a #GParamSpecUInt16.
+ *
+ * Since: 2.20
+ */
+#define G_PARAM_SPEC_UINT16(pspec)         (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT16, GParamSpecUInt16))
+
+/**
  * G_TYPE_PARAM_INT:
  * 
  * The #GType of #GParamSpecInt.
@@ -554,6 +612,8 @@
 typedef struct _GParamSpecChar       GParamSpecChar;
 typedef struct _GParamSpecUChar      GParamSpecUChar;
 typedef struct _GParamSpecBoolean    GParamSpecBoolean;
+typedef struct _GParamSpecInt16      GParamSpecInt16;
+typedef struct _GParamSpecUInt16     GParamSpecUInt16;
 typedef struct _GParamSpecInt        GParamSpecInt;
 typedef struct _GParamSpecUInt       GParamSpecUInt;
 typedef struct _GParamSpecLong       GParamSpecLong;
@@ -622,6 +682,44 @@
   gboolean      default_value;
 };
 /**
+ * GParamSpecInt16:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * 
+ * A #GParamSpec derived structure that contains the meta data for 16bit integer properties.
+ *
+ * Since: 2.20
+ */
+struct _GParamSpecInt16
+{
+  GParamSpec    parent_instance;
+  
+  gint16        minimum;
+  gint16        maximum;
+  gint16        default_value;
+};
+/**
+ * GParamSpecUInt16:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * 
+ * A #GParamSpec derived structure that contains the meta data for unsigned 16bit integer properties.
+ *
+ * Since: 2.20
+ */
+struct _GParamSpecUInt16
+{
+  GParamSpec    parent_instance;
+  
+  guint16       minimum;
+  guint16       maximum;
+  guint16       default_value;
+};
+/**
  * GParamSpecInt:
  * @parent_instance: private #GParamSpec portion
  * @minimum: minimum value for the property specified
@@ -942,6 +1040,20 @@
 					  const gchar	 *blurb,
 					  gboolean	  default_value,
 					  GParamFlags	  flags);
+GParamSpec*	g_param_spec_int16	 (const gchar	 *name,
+					  const gchar	 *nick,
+					  const gchar	 *blurb,
+					  gint16       	  minimum,
+					  gint16       	  maximum,
+					  gint16       	  default_value,
+					  GParamFlags	  flags);
+GParamSpec*	g_param_spec_uint16	 (const gchar	 *name,
+					  const gchar	 *nick,
+					  const gchar	 *blurb,
+					  guint16	  minimum,
+					  guint16	  maximum,
+					  guint16	  default_value,
+					  GParamFlags	  flags);
 GParamSpec*	g_param_spec_int	 (const gchar	 *name,
 					  const gchar	 *nick,
 					  const gchar	 *blurb,
Index: gobject/gvaluetypes.h
===================================================================
--- gobject/gvaluetypes.h	(revision 7681)
+++ gobject/gvaluetypes.h	(working copy)
@@ -58,6 +58,28 @@
  */
 #define G_VALUE_HOLDS_BOOLEAN(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_BOOLEAN))
 /**
+ * G_VALUE_HOLDS_INT16:
+ * @value: a valid #GValue structure
+ * 
+ * Checks whether the given #GValue can hold values of type %G_TYPE_INT16.
+ * 
+ * Returns: %TRUE on success.
+ *
+ * Since: 2.20
+ */
+#define G_VALUE_HOLDS_INT16(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_INT16))
+/**
+ * G_VALUE_HOLDS_UINT16:
+ * @value: a valid #GValue structure
+ * 
+ * Checks whether the given #GValue can hold values of type %G_TYPE_UINT16.
+ * 
+ * Returns: %TRUE on success.
+ *
+ * Since: 2.20
+ */
+#define G_VALUE_HOLDS_UINT16(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_UINT16))
+/**
  * G_VALUE_HOLDS_INT:
  * @value: a valid #GValue structure
  * 
@@ -175,6 +197,12 @@
 void		      g_value_set_boolean	(GValue	      *value,
 						 gboolean      v_boolean);
 gboolean	      g_value_get_boolean	(const GValue *value);
+void		      g_value_set_int16		(GValue	      *value,
+						 gint16	       v_int16);
+gint16		      g_value_get_int16		(const GValue *value);
+void		      g_value_set_uint16	(GValue	      *value,
+						 guint16      v_uint16);
+guint16		      g_value_get_uint16	(const GValue *value);
 void		      g_value_set_int		(GValue	      *value,
 						 gint	       v_int);
 gint		      g_value_get_int		(const GValue *value);
Index: gobject/gvalue.h
===================================================================
--- gobject/gvalue.h	(revision 7681)
+++ gobject/gvalue.h	(working copy)
@@ -112,6 +112,8 @@
 
   /* public for GTypeValueTable methods */
   union {
+    gint16      v_int16;
+    guint16     v_uint16;
     gint	v_int;
     guint	v_uint;
     glong	v_long;
Index: gobject/glib-genmarshal.c
===================================================================
--- gobject/glib-genmarshal.c	(revision 7681)
+++ gobject/glib-genmarshal.c	(working copy)
@@ -136,6 +136,8 @@
   fputs ("#define g_marshal_value_peek_boolean(v)  g_value_get_boolean (v)\n", fout);
   fputs ("#define g_marshal_value_peek_char(v)     g_value_get_char (v)\n", fout);
   fputs ("#define g_marshal_value_peek_uchar(v)    g_value_get_uchar (v)\n", fout);
+  fputs ("#define g_marshal_value_peek_int16(v)    g_value_get_int16 (v)\n", fout);
+  fputs ("#define g_marshal_value_peek_uint16(v)   g_value_get_uint16 (v)\n", fout);
   fputs ("#define g_marshal_value_peek_int(v)      g_value_get_int (v)\n", fout);
   fputs ("#define g_marshal_value_peek_uint(v)     g_value_get_uint (v)\n", fout);
   fputs ("#define g_marshal_value_peek_long(v)     g_value_get_long (v)\n", fout);
@@ -159,6 +161,8 @@
   fputs ("#define g_marshal_value_peek_boolean(v)  (v)->data[0].v_int\n", fout);
   fputs ("#define g_marshal_value_peek_char(v)     (v)->data[0].v_int\n", fout);
   fputs ("#define g_marshal_value_peek_uchar(v)    (v)->data[0].v_uint\n", fout);
+  fputs ("#define g_marshal_value_peek_int16(v)    (v)->data[0].v_int16\n", fout);
+  fputs ("#define g_marshal_value_peek_uint16(v)   (v)->data[0].v_uint16\n", fout);
   fputs ("#define g_marshal_value_peek_int(v)      (v)->data[0].v_int\n", fout);
   fputs ("#define g_marshal_value_peek_uint(v)     (v)->data[0].v_uint\n", fout);
   fputs ("#define g_marshal_value_peek_long(v)     (v)->data[0].v_long\n", fout);
@@ -187,6 +191,8 @@
     { "BOOLEAN",	"BOOLEAN",	"gboolean",	"g_marshal_value_peek_boolean",	},
     { "CHAR",		"CHAR",		"gchar",	"g_marshal_value_peek_char",	},
     { "UCHAR",		"UCHAR",	"guchar",	"g_marshal_value_peek_uchar",	},
+    { "INT16",		"INT16",	"gint16",       "g_marshal_value_peek_int16",	},
+    { "UINT16",		"UINT16",	"guint16",	"g_marshal_value_peek_uint16",	},
     { "INT",		"INT",		"gint",		"g_marshal_value_peek_int",	},
     { "UINT",		"UINT",		"guint",	"g_marshal_value_peek_uint",	},
     { "LONG",		"LONG",		"glong",	"g_marshal_value_peek_long",	},
@@ -231,6 +237,8 @@
     { "BOOLEAN",	"BOOLEAN",	"gboolean",	"g_value_set_boolean",			     },
     { "CHAR",		"CHAR",		"gchar",	"g_value_set_char",			     },
     { "UCHAR",		"UCHAR",	"guchar",	"g_value_set_uchar",			     },
+    { "INT16",		"INT16",	"gint16",	"g_value_set_int16",			     },
+    { "UINT16",		"UINT16",	"guint16",	"g_value_set_uint16",			     },
     { "INT",		"INT",		"gint",		"g_value_set_int",			     },
     { "UINT",		"UINT",		"guint",	"g_value_set_uint",			     },
     { "LONG",		"LONG",		"glong",	"g_value_set_long",			     },
Index: gobject/gtype.h
===================================================================
--- gobject/gtype.h	(revision 7681)
+++ gobject/gtype.h	(working copy)
@@ -90,6 +90,22 @@
  */
 #define G_TYPE_BOOLEAN			G_TYPE_MAKE_FUNDAMENTAL (5)
 /**
+ * G_TYPE_INT16:
+ * 
+ * The fundamental type corresponding to #gint16.
+ *
+ * Since: 2.20
+ */
+#define G_TYPE_INT16			G_TYPE_MAKE_FUNDAMENTAL (21)
+/**
+ * G_TYPE_UINT16:
+ * 
+ * The fundamental type corresponding to #guint16.
+ *
+ * Since: 2.20
+ */
+#define G_TYPE_UINT16			G_TYPE_MAKE_FUNDAMENTAL (22)
+/**
  * G_TYPE_INT:
  * 
  * The fundamental type corresponding to #gint.
