Index: src/common/chromeos/glib/object.h |
diff --git a/src/common/chromeos/glib/object.h b/src/common/chromeos/glib/object.h |
index 319e131ccd0d915e0489645722acb04feeba94f9..de96cc568b26f90278564e3e13e7c443c4c59d32 100644 |
--- a/src/common/chromeos/glib/object.h |
+++ b/src/common/chromeos/glib/object.h |
@@ -115,6 +115,11 @@ inline ::GType type_to_gtypeid< ::int64>() { |
return G_TYPE_INT64; |
}; |
+template < > |
+inline ::GType type_to_gtypeid< ::int32>() { |
+ return G_TYPE_INT; |
+}; |
+ |
// \brief Value (and Retrieve) support using std::string as well as const char* |
// by promoting from const char* to the string. promote_from provides a mapping |
// for this promotion (and possibly others in the future). |
@@ -158,11 +163,14 @@ template < > |
inline ::uint8 RawCast< ::uint8>(const ::GValue& x) { |
return static_cast< ::uint8>(::g_value_get_uchar(&x)); |
} |
- |
template < > |
inline ::int64 RawCast< ::int64>(const ::GValue& x) { |
return static_cast< ::int64>(::g_value_get_int64(&x)); |
} |
+template < > |
+inline ::int32 RawCast< ::int32>(const ::GValue& x) { |
+ return static_cast< ::int32>(::g_value_get_int(&x)); |
+} |
inline void RawSet(GValue* x, const std::string& v) { |
::g_value_set_string(x, v.c_str()); |
@@ -185,6 +193,9 @@ inline void RawSet(GValue* x, ::uint8 v) { |
inline void RawSet(GValue* x, ::int64 v) { |
::g_value_set_int64(x, v); |
} |
+inline void RawSet(GValue* x, ::int32 v) { |
+ ::g_value_set_int(x, v); |
+} |
// \brief Value is a data type for managing GValues. |
// |