summaryrefslogtreecommitdiff
path: root/girepository/gitypelib.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2010-07-07 14:07:17 -0400
committerColin Walters <walters@verbum.org>2010-07-09 14:15:52 -0400
commit5cb925b20739c04e18e94a03a3e4e68041894b03 (patch)
tree246f895c0a92ab1afd341170e45908104964ece3 /girepository/gitypelib.c
parent07a36b499a7db6c65132511dc43f6acd281100ec (diff)
downloadgobject-introspection-5cb925b20739c04e18e94a03a3e4e68041894b03.tar.gz
Don't include machine-dependent integral types in the typelib
Previously we had both e.g. GI_TYPE_TAG_LONG and GI_TYPE_TAG_INT64, but in fact the typelib is already machine-specific, so it makes sense to just encode this as a fixed type. The .gir remains abstract. We also remove size_t from the typelib; one would never want to treat it differently than an integer. time_t is removed as well; while bindings like gjs had special handling to turn it into e.g. a JS Date object, I don't think we should encourage people to use these POSIX types in their API. Use GTimeVal or the like instead. Because the typelib is now really machine-specific, we need to remove the -expected.tgirs from git. (We could potentially add a check which wasn't just a literal diff later) https://bugzilla.gnome.org/show_bug.cgi?id=623774
Diffstat (limited to 'girepository/gitypelib.c')
-rw-r--r--girepository/gitypelib.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/girepository/gitypelib.c b/girepository/gitypelib.c
index 06a38d24..0741bcb1 100644
--- a/girepository/gitypelib.c
+++ b/girepository/gitypelib.c
@@ -909,17 +909,8 @@ validate_constant_blob (GTypelib *typelib,
4, /* UINT32 */
8, /* INT64 */
8, /* UINT64 */
- sizeof (gshort),
- sizeof (gushort),
- sizeof (gint),
- sizeof (guint),
- sizeof (glong),
- sizeof (gulong),
- sizeof (gssize),
- sizeof (gsize),
sizeof (gfloat),
sizeof (gdouble),
- sizeof (time_t),
0, /* GTYPE */
0, /* UTF8 */
0, /* FILENAME */
@@ -933,6 +924,8 @@ validate_constant_blob (GTypelib *typelib,
ConstantBlob *blob;
SimpleTypeBlob *type;
+ g_assert (G_N_ELEMENTS (value_size) == GI_TYPE_TAG_ERROR + 1);
+
if (typelib->len < offset + sizeof (ConstantBlob))
{
g_set_error (error,