switch (b) { case 'b': return g_variant_type_copy (G_VARIANT_TYPE_BOOLEAN); case 'y': return g_variant_type_copy (G_VARIANT_TYPE_BYTE); case 'n': return g_variant_type_copy (G_VARIANT_TYPE_INT16); case 'q': return g_variant_type_copy (G_VARIANT_TYPE_UINT16); case 'i': return g_variant_type_copy (G_VARIANT_TYPE_INT32); case 'u': return g_variant_type_copy (G_VARIANT_TYPE_UINT32); case 'x': return g_variant_type_copy (G_VARIANT_TYPE_INT64); case 't': return g_variant_type_copy (G_VARIANT_TYPE_UINT64); case 'h': return g_variant_type_copy (G_VARIANT_TYPE_HANDLE); case 'd': return g_variant_type_copy (G_VARIANT_TYPE_DOUBLE); case 's': return g_variant_type_copy (G_VARIANT_TYPE_STRING); case 'o': return g_variant_type_copy (G_VARIANT_TYPE_OBJECT_PATH); case 'g': return g_variant_type_copy (G_VARIANT_TYPE_SIGNATURE); case '?': return g_variant_type_copy (G_VARIANT_TYPE_BASIC); default: g_assert_not_reached ();
标签:return,variant,VARIANT,type,类型,copy,TYPE From: https://www.cnblogs.com/hshy/p/17350239.html