+#define TREALLOC(p,l) ((void*)Tcl_Realloc((void*)(p),(l)))
+
+/* macros for Chiark_tcl_FOOBAR_Init et al */
+
+ /*
+ * use these macros like this:
+ * CHT_INIT(<extbase>,
+ * <preparations>,
+ * <results>)
+ * where
+ *
+ * <extbase> is the short name eg `hbytes'
+ * and should correspond to EXTBASE from the Makefile.
+ *
+ * <results> are the initialisations which cause new commands
+ * etc. to appear in the Tcl namespace. Eg, CHTI_COMMANDS,
+ * These initialisations are called only when a Tcl `load'
+ * command loads this extension.
+ *
+ * <preparations> are the initialisations that we need but which
+ * do not interfere with the Tcl namespaces. For example,
+ * OBJECT types we used (CHTI_TYPE), and other chiark_tcl
+ * extensions (CHTI_OTHER). These initialisations are called
+ * both as a result of Tcl `load' (before the <results>
+ * initialisations) and also when another extension declares a
+ * dependency on this one with CHTI_OTHER.
+ *
+ * Both <results> and <preparations> are whitespace-separated
+ * lists of calls to CHTI_... macros. If the list is to be empty,
+ * write `{ }' instead to prevent an empty macro argument. The
+ * preparations and results currently supported are:
+ *
+ * CHTI_COMMANDS(cht_<somethingtoplevel>_entries)
+ * where the .tct file contains
+ * Table *<somethingtoplevel> TopLevel_Command
+ *
+ * CHTI_OTHER(<extbase-of-underlying-extension>)
+ * which does the <preparations> of that extension
+ * (if they have not already been done).
+ *
+ * CHTI_TYPE(cht_<something>_type)
+ * where extern Tcl_ObjType cht_<something>_type;
+ * Note that CHTI_TYPE should only be called by the
+ * extension which actually implements the type. Other
+ * extensions which need it should use CHTI_OTHER to bring
+ * in the implementing extension.
+ */