diff options
Diffstat (limited to 'generic/tclTest.c')
-rw-r--r-- | generic/tclTest.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/tclTest.c b/generic/tclTest.c index 396a321..e1f7cdb 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.30 2001/09/06 17:51:00 vincentdarley Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.31 2001/09/20 01:00:10 hobbs Exp $ */ #define TCL_TEST @@ -848,7 +848,7 @@ TestcmdtokenCmd(dummy, interp, argc, argv) char **argv; /* Argument strings. */ { Tcl_Command token; - long int l; + int *l; char buf[30]; if (argc != 3) { @@ -859,12 +859,12 @@ TestcmdtokenCmd(dummy, interp, argc, argv) if (strcmp(argv[1], "create") == 0) { token = Tcl_CreateCommand(interp, argv[2], CmdProc1, (ClientData) "original", (Tcl_CmdDeleteProc *) NULL); - sprintf(buf, "%lx", (long int) token); + sprintf(buf, "%p", (VOID *)token); Tcl_SetResult(interp, buf, TCL_VOLATILE); } else if (strcmp(argv[1], "name") == 0) { Tcl_Obj *objPtr; - - if (sscanf(argv[2], "%lx", &l) != 1) { + + if (sscanf(argv[2], "%p", &l) != 1) { Tcl_AppendResult(interp, "bad command token \"", argv[2], "\"", (char *) NULL); return TCL_ERROR; @@ -872,7 +872,7 @@ TestcmdtokenCmd(dummy, interp, argc, argv) objPtr = Tcl_NewObj(); Tcl_GetCommandFullName(interp, (Tcl_Command) l, objPtr); - + Tcl_AppendElement(interp, Tcl_GetCommandName(interp, (Tcl_Command) l)); Tcl_AppendElement(interp, Tcl_GetString(objPtr)); |