Blob Blame History Raw
diff -up expect-5.43/exp_command.c_old expect-5.43/exp_command.c
--- expect-5.43/exp_command.c_old	2009-02-10 16:23:48.000000000 +0100
+++ expect-5.43/exp_command.c	2009-02-10 16:31:38.000000000 +0100
@@ -2311,12 +2311,11 @@ Tcl_Obj *CONST objv[];	/* Argument objec
 	/* Historical note: we used "close"  long before there was a */
 	/* Tcl builtin by the same name. */
 
-	Tcl_CmdInfo info;
+	Tcl_CmdInfo* close_info;
 	Tcl_ResetResult(interp);
-	if (0 == Tcl_GetCommandInfo(interp,"close",&info)) {
-	    info.clientData = 0;
-	}
-	return(Tcl_CloseObjCmd(info.clientData,interp,objc_orig,objv_orig));
+
+	close_info = (Tcl_CmdInfo*) Tcl_GetAssocData (interp, EXP_CMDINFO_CLOSE, NULL);
+	return(close_info->objProc(close_info->objClientData,interp,objc,objv));
     }
 
     if (chanName) {
@@ -2961,7 +2960,10 @@ Tcl_Obj *CONST objv[];
     /* if successful (i.e., TCL_RETURN is returned) */
     /* modify the result, so that we will handle it specially */
 
-    int result = Tcl_ReturnObjCmd(clientData,interp,objc,objv);
+    Tcl_CmdInfo* return_info = (Tcl_CmdInfo*)
+    Tcl_GetAssocData (interp, EXP_CMDINFO_RETURN, NULL);
+
+    int result = return_info->objProc(return_info->objClientData,interp,objc,objv);
     if (result == TCL_RETURN)
         result = EXP_TCL_RETURN;
     return result;
diff -up expect-5.43/exp_command.h_old expect-5.43/exp_command.h
--- expect-5.43/exp_command.h_old	2009-02-10 17:33:19.000000000 +0100
+++ expect-5.43/exp_command.h	2009-02-10 17:33:46.000000000 +0100
@@ -326,3 +326,6 @@ EXTERN ExpState *	expDevttyGet _ANSI_ARG
 /* generic functions that really should be provided by Tcl */
 EXTERN int		expSizeGet _ANSI_ARGS_((ExpState *));
 EXTERN int		expSizeZero _ANSI_ARGS_((ExpState *));
+
+#define EXP_CMDINFO_CLOSE  "expect/cmdinfo/close"
+#define EXP_CMDINFO_RETURN "expect/cmdinfo/return"