diff options
author | Colin Walters <walters@verbum.org> | 2010-07-07 14:07:17 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2010-07-09 14:15:52 -0400 |
commit | 5cb925b20739c04e18e94a03a3e4e68041894b03 (patch) | |
tree | 246f895c0a92ab1afd341170e45908104964ece3 /girepository/girnode.c | |
parent | 07a36b499a7db6c65132511dc43f6acd281100ec (diff) | |
download | gobject-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/girnode.c')
-rw-r--r-- | girepository/girnode.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/girepository/girnode.c b/girepository/girnode.c index af24161d..17b739ea 100644 --- a/girepository/girnode.c +++ b/girepository/girnode.c @@ -2319,33 +2319,6 @@ g_ir_node_build_typelib (GIrNode *node, blob->size = 8; DO_ALIGNED_COPY(&data[blob->offset], parse_uint_value (constant->value), guint64); break; - case GI_TYPE_TAG_SHORT: - blob->size = sizeof (gshort); - *(gshort*)&data[blob->offset] = (gshort) parse_int_value (constant->value); - break; - case GI_TYPE_TAG_USHORT: - blob->size = sizeof (gushort); - *(gushort*)&data[blob->offset] = (gushort) parse_uint_value (constant->value); - break; - case GI_TYPE_TAG_INT: - blob->size = sizeof (gint); - *(gint*)&data[blob->offset] = (gint) parse_int_value (constant->value); - break; - case GI_TYPE_TAG_UINT: - blob->size = sizeof (guint); - *(gint*)&data[blob->offset] = (guint) parse_uint_value (constant->value); - break; - case GI_TYPE_TAG_SSIZE: /* FIXME */ - case GI_TYPE_TAG_LONG: - blob->size = sizeof (glong); - DO_ALIGNED_COPY(&data[blob->offset], parse_int_value (constant->value), glong); - break; - case GI_TYPE_TAG_SIZE: /* FIXME */ - case GI_TYPE_TAG_TIME_T: - case GI_TYPE_TAG_ULONG: - blob->size = sizeof (gulong); - DO_ALIGNED_COPY(&data[blob->offset], parse_uint_value (constant->value), gulong); - break; case GI_TYPE_TAG_FLOAT: blob->size = sizeof (gfloat); DO_ALIGNED_COPY(&data[blob->offset], parse_float_value (constant->value), gfloat); |