+#define SOD_CLASSOF(obj) ((const SodClass *)(obj)->_vt->_class)
+
+/* --- @SOD_INSTBASE@ --- *
+ *
+ * Arguments: @obj@ = pointer to an instance (i.e., the address of one of
+ * its instance chains)
+ *
+ * Returns: The base address of @obj@'s instance layout, as a @void *@.
+ *
+ * Use: Finds the base address of an instance. If you know the
+ * dynamic class of the object then @SOD_ILAYOUT@ is faster. If
+ * you don't, this is the right macro, but your options for
+ * doing something sensible with the result are limited, mostly
+ * to simple memory management operations such as freeing or
+ * zeroizing the instance structure.
+ */
+
+#define SOD_INSTBASE(obj) ((void *)((char *)(obj) - (obj)->_vt->_base))
+
+/* --- @SOD_CONVERT@ --- *
+ *
+ * Arguments: @cls@ = a class type name
+ * @const void *obj@ = a pointer to an instance
+ *
+ * Returns: Pointer to appropriate instance ichain, or null if the
+ * instance isn't of the specified class.
+ *
+ * Use: This is a simple wrapper around the @sod_convert@, which
+ * you should see for full details. It accepts a class type
+ * name rather than a pointer to a class object, and arranges to
+ * return a pointer of the correct type.
+ */
+
+#define SOD_CONVERT(cls, obj) ((cls *)sod_convert(cls##__class, (obj)))
+
+/* --- @SOD_DECL@ --- *
+ *
+ * Arguments: @cls_@ = a class type name
+ * @var_@ = a variable name
+ *
+ * Use: Declare @var_@ as a pointer to an initialized instance of
+ * @cls_@ with automatic lifetime.
+ */
+
+#define SOD_DECL(cls_, var_) \
+ struct cls_##__ilayout var_##__layout; \
+ cls_ *var_ = cls_##__class->cls.init(&var_##__layout)