}
}
-int cht_initextension(Tcl_Interp *ip, const TopLevel_Command *cmds,
- int *donep /* or 0, meaning no types follow */,
- ... /* types, terminated by 0 */) {
- static int cht_initd;
+void cht_prepare__basic(Tcl_Interp *ip) {
+ static int prepared;
+
+ if (prepared) return;
+ Tcl_RegisterObjType(&cht_tabledataid_nearlytype);
+ Tcl_RegisterObjType(&cht_enum_nearlytype);
+ Tcl_RegisterObjType(&cht_enum1_nearlytype);
+ prepared= 1;
+}
+void cht_setup__commands(Tcl_Interp *ip, const TopLevel_Command *cmds) {
const TopLevel_Command *cmd;
- Tcl_ObjType *ot;
-
- va_list al;
-
- if (!cht_initd) {
- cht_initd= 1;
- Tcl_RegisterObjType(&cht_tabledataid_nearlytype);
- Tcl_RegisterObjType(&cht_enum_nearlytype);
- Tcl_RegisterObjType(&cht_enum1_nearlytype);
- }
-
- if (donep && !*donep) {
- *donep= 1;
- va_start(al, donep);
- while ((ot= va_arg(al, Tcl_ObjType*)))
- Tcl_RegisterObjType(ot);
- }
-
+
for (cmd= cmds;
cmd->name;
cmd++)
Tcl_CreateObjCommand(ip, (char*)cmd->name, cmd->func, 0,0);
-
- return TCL_OK;
}