$OpenBSD: patch-Tcl_cc,v 1.1 2001/07/30 15:33:22 espie Exp $
--- Tcl.cc.orig	Wed Apr  3 06:53:27 1996
+++ Tcl.cc	Mon Jul 30 17:25:38 2001
@@ -65,6 +65,7 @@ void Tcl::init(Tcl_Interp* tcl, const ch
 {
 	instance_.tcl_ = tcl;
 	instance_.application_ = application;
+	Tcl_Init(tcl);
 }
 
 void Tcl::evalc(const char* s)
@@ -162,6 +163,8 @@ TclObject::~TclObject()
 	Tcl& tcl = Tcl::instance();
 	if (!tcl.dark())
 		tcl.DeleteCommand(name_);
+	if (name_ != 0)
+		delete name_;
 	TclObject** p;
 	for (p = &all_; *p != this; p = &(*p)->next_)
 		;
@@ -197,8 +200,9 @@ void TclObject::inception()
 void TclObject::setproc(const char* s)
 {
 	Tcl& tcl = Tcl::instance();
-	if (name_ != 0 && !tcl.dark()) {
-		tcl.DeleteCommand(name_);
+	if (name_ != 0) {
+		if (!tcl.dark())
+			tcl.DeleteCommand(name_);
 		delete name_;
 	}
 	int n = strlen(s);
