summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2009-11-04 11:43:13 -0500
committerColin Walters <walters@verbum.org>2009-11-04 11:43:13 -0500
commit3715b02198c9efc34d70f489d4e55a39456d8f99 (patch)
treee10bf04e88c08cd7e8a522c9c9b1adff877ec0a6
parent4948bc893a1611f0a213ba105fba517fc9d3805e (diff)
downloadgobject-introspection-3715b02198c9efc34d70f489d4e55a39456d8f99.tar.gz
[gtypelib.h] Document SimpleTypeBlob more
-rw-r--r--girepository/gtypelib.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/girepository/gtypelib.h b/girepository/gtypelib.h
index 488c1b33..015682e2 100644
--- a/girepository/gtypelib.h
+++ b/girepository/gtypelib.h
@@ -303,6 +303,20 @@ typedef struct {
* @offset: Offset relative to header->types that points to a TypeBlob.
* Unlike other offsets, this is in words (ie 32bit units) rather
* than bytes.
+ *
+ * The SimpleTypeBlob is the general purpose "reference to a type" construct, used
+ * in method parameters, returns, callback definitions, fields, constants, etc.
+ * It's actually just a 32 bit integer which you can see from the union definition.
+ * This is for efficiency reasons, since there are so many references to types.
+ *
+ * SimpleTypeBlob is divided into two cases; first, if "reserved" and "reserved2", the
+ * type tag for a basic type is embedded in the "tag" bits. This allows e.g.
+ * GI_TYPE_TAG_UTF8, GI_TYPE_TAG_INT and the like to be embedded directly without
+ * taking up extra space.
+ *
+ * References to "interfaces" (objects, interfaces) are more complicated; In this case,
+ * the integer is actually an offset into the directory (see above). Because the header
+ * is larger than 2^8=256 bits, all offsets will have one of the upper 24 bits set.
*/
typedef union
{