diff options
author | hobbs <hobbs> | 2001-09-20 01:00:10 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2001-09-20 01:00:10 (GMT) |
commit | 7054c31eabdfc0565f087966c87fee5d154c9355 (patch) | |
tree | 1e1a0eb49995b99cb9e09dc0b8e5d23c208447eb | |
parent | 5e994b8fa76ce04b274569f7063cf43692186e2b (diff) | |
download | tcl-7054c31eabdfc0565f087966c87fee5d154c9355.zip tcl-7054c31eabdfc0565f087966c87fee5d154c9355.tar.gz tcl-7054c31eabdfc0565f087966c87fee5d154c9355.tar.bz2 |
* generic/tclTest.c (TestcmdtokenCmd): corrected pointer
storage/retrieval for 64bit machines.
-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)); |