summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2001-09-20 01:13:03 (GMT)
committerhobbs <hobbs>2001-09-20 01:13:03 (GMT)
commit557a25b6e1781bae6474e04f01c81830af8c1788 (patch)
tree28415daa7d6326e5a8b70b58a2061a048d92516e
parent88a0b7abea9181b4730228bd0d04a66c385c30a6 (diff)
downloadtcl-557a25b6e1781bae6474e04f01c81830af8c1788.zip
tcl-557a25b6e1781bae6474e04f01c81830af8c1788.tar.gz
tcl-557a25b6e1781bae6474e04f01c81830af8c1788.tar.bz2
* generic/tclTest.c (TestcmdtokenCmd): corrected pointer
storage/retrieval for 64bit machines.
-rw-r--r--generic/tclTest.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 33f6a58..30373ab 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.17.2.2 2000/08/06 00:20:10 hobbs Exp $
+ * RCS: @(#) $Id: tclTest.c,v 1.17.2.3 2001/09/20 01:13:03 hobbs Exp $
*/
#define TCL_TEST
@@ -740,7 +740,7 @@ TestcmdtokenCmd(dummy, interp, argc, argv)
char **argv; /* Argument strings. */
{
Tcl_Command token;
- long int l;
+ int *l;
char buf[30];
if (argc != 3) {
@@ -751,12 +751,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;
@@ -764,7 +764,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));