summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2014-06-03 11:08:38 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2014-06-03 11:08:38 (GMT)
commit622180938c63060edf98112f7b99e35b4b2551ad (patch)
treec79192f74a513c9e559f678cef64aeb06f6d1b3b
parentd962821b84a7745d3cc1a45c6e58e7192d2b764f (diff)
downloadtk-622180938c63060edf98112f7b99e35b4b2551ad.zip
tk-622180938c63060edf98112f7b99e35b4b2551ad.tar.gz
tk-622180938c63060edf98112f7b99e35b4b2551ad.tar.bz2
Convert TkpTestembedCmd and TkpTesttextCmd to Tcl_Obj-based commands.
-rw-r--r--generic/tkInt.decls8
-rw-r--r--generic/tkIntDecls.h17
-rw-r--r--generic/tkTest.c49
-rw-r--r--generic/tkText.c34
-rw-r--r--macosx/tkMacOSXEmbed.c6
-rw-r--r--macosx/tkMacOSXHLEvents.c17
-rw-r--r--macosx/tkMacOSXMenus.c17
-rw-r--r--macosx/tkMacOSXTest.c14
-rw-r--r--macosx/tkMacOSXWindowEvent.c3
-rw-r--r--unix/tkUnixEmbed.c6
-rw-r--r--win/tkWinEmbed.c4
11 files changed, 84 insertions, 91 deletions
diff --git a/generic/tkInt.decls b/generic/tkInt.decls
index 19d5c29..b9356d2 100644
--- a/generic/tkInt.decls
+++ b/generic/tkInt.decls
@@ -506,12 +506,12 @@ declare 154 {
# entries needed only by tktest:
declare 156 {
- int TkpTestembedCmd(ClientData clientData, Tcl_Interp *interp, int argc,
- const char **argv)
+ int TkpTestembedCmd(ClientData clientData, Tcl_Interp *interp, int objc,
+ Tcl_Obj *const objv[])
}
declare 157 {
- int TkpTesttextCmd(ClientData dummy, Tcl_Interp *interp, int argc,
- const char **argv)
+ int TkpTesttextCmd(ClientData dummy, Tcl_Interp *interp, int objc,
+ Tcl_Obj *const objv[])
}
declare 158 {
int TkSelGetSelection(Tcl_Interp *interp, Tk_Window tkwin,
diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h
index 67a4f4b..261d3db 100644
--- a/generic/tkIntDecls.h
+++ b/generic/tkIntDecls.h
@@ -433,11 +433,12 @@ EXTERN void TkDeleteThreadExitHandler(Tcl_ExitProc *proc,
/* Slot 155 is reserved */
/* 156 */
EXTERN int TkpTestembedCmd(ClientData clientData,
- Tcl_Interp *interp, int argc,
- const char **argv);
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *const objv[]);
/* 157 */
-EXTERN int TkpTesttextCmd(ClientData dummy, Tcl_Interp *interp,
- int argc, const char **argv);
+EXTERN int TkpTesttextCmd(ClientData dummy,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *const objv[]);
/* 158 */
EXTERN int TkSelGetSelection(Tcl_Interp *interp,
Tk_Window tkwin, Atom selection, Atom target,
@@ -738,8 +739,8 @@ typedef struct TkIntStubs {
void (*tkCreateThreadExitHandler) (Tcl_ExitProc *proc, ClientData clientData); /* 153 */
void (*tkDeleteThreadExitHandler) (Tcl_ExitProc *proc, ClientData clientData); /* 154 */
void (*reserved155)(void);
- int (*tkpTestembedCmd) (ClientData clientData, Tcl_Interp *interp, int argc, const char **argv); /* 156 */
- int (*tkpTesttextCmd) (ClientData dummy, Tcl_Interp *interp, int argc, const char **argv); /* 157 */
+ int (*tkpTestembedObjCmd) (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); /* 156 */
+ int (*tkpTesttextObjCmd) (ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); /* 157 */
int (*tkSelGetSelection) (Tcl_Interp *interp, Tk_Window tkwin, Atom selection, Atom target, Tk_GetSelProc *proc, ClientData clientData); /* 158 */
int (*tkTextGetIndex) (Tcl_Interp *interp, struct TkText *textPtr, const char *string, struct TkTextIndex *indexPtr); /* 159 */
int (*tkTextIndexBackBytes) (const struct TkText *textPtr, const struct TkTextIndex *srcPtr, int count, struct TkTextIndex *dstPtr); /* 160 */
@@ -1082,9 +1083,9 @@ extern const TkIntStubs *tkIntStubsPtr;
(tkIntStubsPtr->tkDeleteThreadExitHandler) /* 154 */
/* Slot 155 is reserved */
#define TkpTestembedCmd \
- (tkIntStubsPtr->tkpTestembedCmd) /* 156 */
+ (tkIntStubsPtr->tkpTestembedObjCmd) /* 156 */
#define TkpTesttextCmd \
- (tkIntStubsPtr->tkpTesttextCmd) /* 157 */
+ (tkIntStubsPtr->tkpTesttextObjCmd) /* 157 */
#define TkSelGetSelection \
(tkIntStubsPtr->tkSelGetSelection) /* 158 */
#define TkTextGetIndex \
diff --git a/generic/tkTest.c b/generic/tkTest.c
index db7f470..1514604 100644
--- a/generic/tkTest.c
+++ b/generic/tkTest.c
@@ -159,8 +159,9 @@ static int TestdeleteappsObjCmd(ClientData dummy,
static int TestfontObjCmd(ClientData dummy,
Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[]);
-static int TestmakeexistCmd(ClientData dummy,
- Tcl_Interp *interp, int argc, const char **argv);
+static int TestmakeexistObjCmd(ClientData dummy,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *const objv[]);
#if !(defined(_WIN32) || defined(MAC_OSX_TK) || defined(__CYGWIN__))
static int TestmenubarCmd(ClientData dummy,
Tcl_Interp *interp, int argc, const char **argv);
@@ -186,8 +187,9 @@ static void CustomOptionRestore(ClientData clientData,
char *saveInternalPtr);
static void CustomOptionFree(ClientData clientData,
Tk_Window tkwin, char *internalPtr);
-static int TestpropCmd(ClientData dummy,
- Tcl_Interp *interp, int argc, const char **argv);
+static int TestpropObjCmd(ClientData dummy,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj * const objv[]);
#if !(defined(_WIN32) || defined(MAC_OSX_TK) || defined(__CYGWIN__))
static int TestwrapperCmd(ClientData dummy,
Tcl_Interp *interp, int argc, const char **argv);
@@ -233,7 +235,7 @@ Tktest_Init(
* Create additional commands for testing Tk.
*/
- if (Tcl_PkgProvideEx(interp, "Tktest", TK_VERSION, NULL) == TCL_ERROR) {
+ if (Tcl_PkgProvideEx(interp, "Tktest", TK_PATCH_LEVEL, NULL) == TCL_ERROR) {
return TCL_ERROR;
}
@@ -248,17 +250,17 @@ Tktest_Init(
(ClientData) Tk_MainWindow(interp), NULL);
Tcl_CreateObjCommand(interp, "testdeleteapps", TestdeleteappsObjCmd,
(ClientData) Tk_MainWindow(interp), NULL);
- Tcl_CreateCommand(interp, "testembed", TkpTestembedCmd,
+ Tcl_CreateObjCommand(interp, "testembed", TkpTestembedCmd,
(ClientData) Tk_MainWindow(interp), NULL);
Tcl_CreateObjCommand(interp, "testobjconfig", TestobjconfigObjCmd,
(ClientData) Tk_MainWindow(interp), NULL);
Tcl_CreateObjCommand(interp, "testfont", TestfontObjCmd,
(ClientData) Tk_MainWindow(interp), NULL);
- Tcl_CreateCommand(interp, "testmakeexist", TestmakeexistCmd,
+ Tcl_CreateObjCommand(interp, "testmakeexist", TestmakeexistObjCmd,
(ClientData) Tk_MainWindow(interp), NULL);
- Tcl_CreateCommand(interp, "testprop", TestpropCmd,
+ Tcl_CreateObjCommand(interp, "testprop", TestpropObjCmd,
(ClientData) Tk_MainWindow(interp), NULL);
- Tcl_CreateCommand(interp, "testtext", TkpTesttextCmd,
+ Tcl_CreateObjCommand(interp, "testtext", TkpTesttextCmd,
(ClientData) Tk_MainWindow(interp), NULL);
#if defined(_WIN32) || defined(MAC_OSX_TK)
@@ -1638,7 +1640,7 @@ ImageDelete(
/*
*----------------------------------------------------------------------
*
- * TestmakeexistCmd --
+ * TestmakeexistObjCmd --
*
* This function implements the "testmakeexist" command. It calls
* Tk_MakeWindowExist on each of its arguments to force the windows to be
@@ -1655,18 +1657,18 @@ ImageDelete(
/* ARGSUSED */
static int
-TestmakeexistCmd(
+TestmakeexistObjCmd(
ClientData clientData, /* Main window for application. */
Tcl_Interp *interp, /* Current interpreter. */
- int argc, /* Number of arguments. */
- const char **argv) /* Argument strings. */
+ int objc, /* Number of arguments. */
+ Tcl_Obj *const objv[]) /* Argument strings. */
{
Tk_Window mainWin = (Tk_Window) clientData;
int i;
Tk_Window tkwin;
- for (i = 1; i < argc; i++) {
- tkwin = Tk_NameToWindow(interp, argv[i], mainWin);
+ for (i = 1; i < objc; i++) {
+ tkwin = Tk_NameToWindow(interp, Tcl_GetString(objv[i]), mainWin);
if (tkwin == NULL) {
return TCL_ERROR;
}
@@ -1820,7 +1822,7 @@ TestmetricsObjCmd(
/*
*----------------------------------------------------------------------
*
- * TestpropCmd --
+ * TestpropObjCmd --
*
* This function implements the "testprop" command. It fetches and prints
* the value of a property on a window.
@@ -1836,11 +1838,11 @@ TestmetricsObjCmd(
/* ARGSUSED */
static int
-TestpropCmd(
+TestpropObjCmd(
ClientData clientData, /* Main window for application. */
Tcl_Interp *interp, /* Current interpreter. */
- int argc, /* Number of arguments. */
- const char **argv) /* Argument strings. */
+ int objc, /* Number of arguments. */
+ Tcl_Obj *const objv[]) /* Argument strings. */
{
Tk_Window mainWin = (Tk_Window) clientData;
int result, actualFormat;
@@ -1851,14 +1853,13 @@ TestpropCmd(
Window w;
char buffer[30];
- if (argc != 3) {
- Tcl_AppendResult(interp, "wrong # args; must be \"", argv[0],
- " window property\"", NULL);
+ if (objc != 3) {
+ Tcl_WrongNumArgs(interp, 1, objv, "window property");
return TCL_ERROR;
}
- w = strtoul(argv[1], &end, 0);
- propName = Tk_InternAtom(mainWin, argv[2]);
+ w = strtoul(Tcl_GetString(objv[1]), &end, 0);
+ propName = Tk_InternAtom(mainWin, Tcl_GetString(objv[2]));
property = NULL;
result = XGetWindowProperty(Tk_Display(mainWin),
w, propName, 0, 100000, False, AnyPropertyType,
diff --git a/generic/tkText.c b/generic/tkText.c
index 9c436c6..386dac5 100644
--- a/generic/tkText.c
+++ b/generic/tkText.c
@@ -6658,8 +6658,8 @@ int
TkpTesttextCmd(
ClientData clientData, /* Main window for application. */
Tcl_Interp *interp, /* Current interpreter. */
- int argc, /* Number of arguments. */
- const char **argv) /* Argument strings. */
+ int objc, /* Number of arguments. */
+ Tcl_Obj *const objv[]) /* Argument strings. */
{
TkText *textPtr;
size_t len;
@@ -6668,41 +6668,41 @@ TkpTesttextCmd(
char buf[64];
Tcl_CmdInfo info;
- if (argc < 3) {
+ if (objc < 3) {
return TCL_ERROR;
}
- if (Tcl_GetCommandInfo(interp, argv[1], &info) == 0) {
+ if (Tcl_GetCommandInfo(interp, Tcl_GetString(objv[1]), &info) == 0) {
return TCL_ERROR;
}
textPtr = info.objClientData;
- len = strlen(argv[2]);
- if (strncmp(argv[2], "byteindex", len) == 0) {
- if (argc != 5) {
+ len = strlen(Tcl_GetString(objv[2]));
+ if (strncmp(Tcl_GetString(objv[2]), "byteindex", len) == 0) {
+ if (objc != 5) {
return TCL_ERROR;
}
- lineIndex = atoi(argv[3]) - 1;
- byteIndex = atoi(argv[4]);
+ lineIndex = atoi(Tcl_GetString(objv[3])) - 1;
+ byteIndex = atoi(Tcl_GetString(objv[4]));
TkTextMakeByteIndex(textPtr->sharedTextPtr->tree, textPtr, lineIndex,
byteIndex, &index);
- } else if (strncmp(argv[2], "forwbytes", len) == 0) {
- if (argc != 5) {
+ } else if (strncmp(Tcl_GetString(objv[2]), "forwbytes", len) == 0) {
+ if (objc != 5) {
return TCL_ERROR;
}
- if (TkTextGetIndex(interp, textPtr, argv[3], &index) != TCL_OK) {
+ if (TkTextGetIndex(interp, textPtr, Tcl_GetString(objv[3]), &index) != TCL_OK) {
return TCL_ERROR;
}
- byteOffset = atoi(argv[4]);
+ byteOffset = atoi(Tcl_GetString(objv[4]));
TkTextIndexForwBytes(textPtr, &index, byteOffset, &index);
- } else if (strncmp(argv[2], "backbytes", len) == 0) {
- if (argc != 5) {
+ } else if (strncmp(Tcl_GetString(objv[2]), "backbytes", len) == 0) {
+ if (objc != 5) {
return TCL_ERROR;
}
- if (TkTextGetIndex(interp, textPtr, argv[3], &index) != TCL_OK) {
+ if (TkTextGetIndex(interp, textPtr, Tcl_GetString(objv[3]), &index) != TCL_OK) {
return TCL_ERROR;
}
- byteOffset = atoi(argv[4]);
+ byteOffset = atoi(Tcl_GetString(objv[4]));
TkTextIndexBackBytes(textPtr, &index, byteOffset, &index);
} else {
return TCL_ERROR;
diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c
index e2e05d2..1d66b82 100644
--- a/macosx/tkMacOSXEmbed.c
+++ b/macosx/tkMacOSXEmbed.c
@@ -563,15 +563,15 @@ int
TkpTestembedCmd(
ClientData clientData, /* Main window for application. */
Tcl_Interp *interp, /* Current interpreter. */
- int argc, /* Number of arguments. */
- const char **argv) /* Argument strings. */
+ int objc, /* Number of arguments. */
+ Tcl_Obj *const objv[]) /* Argument strings. */
{
int all;
Container *containerPtr;
Tcl_DString dString;
char buffer[50];
- if ((argc > 1) && (strcmp(argv[1], "all") == 0)) {
+ if ((objc > 1) && (strcmp(Tcl_GetString(objv[1]), "all") == 0)) {
all = 1;
} else {
all = 0;
diff --git a/macosx/tkMacOSXHLEvents.c b/macosx/tkMacOSXHLEvents.c
index ffbb06d..8d51c33 100644
--- a/macosx/tkMacOSXHLEvents.c
+++ b/macosx/tkMacOSXHLEvents.c
@@ -221,7 +221,7 @@ OappHandler(
Tcl_Interp *interp = (Tcl_Interp *) handlerRefcon;
if (interp &&
- Tcl_GetCommandInfo(interp, "::tk::mac::OpenApplication", &dummy)){
+ Tcl_FindCommand(interp, "::tk::mac::OpenApplication", NULL, 0)){
int code = Tcl_EvalEx(interp, "::tk::mac::OpenApplication", -1, TCL_EVAL_GLOBAL);
if (code != TCL_OK) {
Tcl_BackgroundException(interp, code);
@@ -252,13 +252,12 @@ RappHandler(
AppleEvent *reply,
SRefCon handlerRefcon)
{
- Tcl_CmdInfo dummy;
Tcl_Interp *interp = (Tcl_Interp *) handlerRefcon;
ProcessSerialNumber thePSN = {0, kCurrentProcess};
OSStatus err = ChkErr(SetFrontProcess, &thePSN);
- if (interp && Tcl_GetCommandInfo(interp,
- "::tk::mac::ReopenApplication", &dummy)) {
+ if (interp && Tcl_FindCommand(interp,
+ "::tk::mac::ReopenApplication", NULL, 0)) {
int code = Tcl_EvalEx(interp, "::tk::mac::ReopenApplication", -1, TCL_EVAL_GLOBAL);
if (code != TCL_OK){
Tcl_BackgroundException(interp, code);
@@ -294,7 +293,7 @@ PrefsHandler(
Tcl_Interp *interp = (Tcl_Interp *) handlerRefcon;
if (interp &&
- Tcl_GetCommandInfo(interp, "::tk::mac::ShowPreferences", &dummy)){
+ Tcl_FindCommand(interp, "::tk::mac::ShowPreferences", NULL, 0)){
int code = Tcl_EvalEx(interp, "::tk::mac::ShowPreferences", -1, TCL_EVAL_GLOBAL);
if (code != TCL_OK) {
Tcl_BackgroundException(interp, code);
@@ -333,7 +332,6 @@ OdocHandler(
long count, index;
AEKeyword keyword;
Tcl_DString command, pathName;
- Tcl_CmdInfo dummy;
int code;
/*
@@ -342,7 +340,7 @@ OdocHandler(
*/
if (!interp ||
- !Tcl_GetCommandInfo(interp, "::tk::mac::OpenDocument", &dummy)) {
+ !Tcl_FindCommand(interp, "::tk::mac::OpenDocument", NULL, 0)) {
return noErr;
}
@@ -433,7 +431,7 @@ PrintHandler(
*/
if (!interp ||
- !Tcl_GetCommandInfo(interp, "::tk::mac::PrintDocument", &dummy)) {
+ !Tcl_FindCommand(interp, "::tk::mac::PrintDocument", NULL, 0)) {
return noErr;
}
@@ -623,8 +621,7 @@ ReallyKillMe(
int flags)
{
Tcl_Interp *interp = ((KillEvent *) eventPtr)->interp;
- Tcl_CmdInfo dummy;
- int quit = Tcl_GetCommandInfo(interp, "::tk::mac::Quit", &dummy);
+ int quit = Tcl_FindCommand(interp, "::tk::mac::Quit", NULL, 0)!=NULL;
int code = Tcl_EvalEx(interp, quit ? "::tk::mac::Quit" : "exit", -1, TCL_EVAL_GLOBAL);
if (code != TCL_OK) {
diff --git a/macosx/tkMacOSXMenus.c b/macosx/tkMacOSXMenus.c
index 881bf75..68b2c00 100644
--- a/macosx/tkMacOSXMenus.c
+++ b/macosx/tkMacOSXMenus.c
@@ -145,10 +145,9 @@ static Tcl_Obj * GetWidgetDemoPath(Tcl_Interp *interp);
SEL action = [anItem action];
if (sel_isEqual(action, @selector(preferences:))) {
- Tcl_CmdInfo dummy;
- return (_eventInterp && Tcl_GetCommandInfo(_eventInterp,
- "::tk::mac::ShowPreferences", &dummy));
+ return (_eventInterp && Tcl_FindCommand(_eventInterp,
+ "::tk::mac::ShowPreferences", NULL, 0));
} else if (sel_isEqual(action, @selector(tkDemo:))) {
BOOL haveDemo = NO;
@@ -169,10 +168,8 @@ static Tcl_Obj * GetWidgetDemoPath(Tcl_Interp *interp);
- (void) orderFrontStandardAboutPanel: (id) sender
{
- Tcl_CmdInfo dummy;
-
- if (!_eventInterp || !Tcl_GetCommandInfo(_eventInterp, "tkAboutDialog",
- &dummy) || (GetCurrentEventKeyModifiers() & optionKey)) {
+ if (!_eventInterp || !Tcl_FindCommand(_eventInterp, "tkAboutDialog",
+ NULL, 0) || (GetCurrentEventKeyModifiers() & optionKey)) {
TkAboutDlg();
} else {
int code = Tcl_EvalEx(_eventInterp, "tkAboutDialog", -1,
@@ -187,10 +184,8 @@ static Tcl_Obj * GetWidgetDemoPath(Tcl_Interp *interp);
- (void) showHelp: (id) sender
{
- Tcl_CmdInfo dummy;
-
- if (!_eventInterp || !Tcl_GetCommandInfo(_eventInterp,
- "::tk::mac::ShowHelp", &dummy)) {
+ if (!_eventInterp || !Tcl_FindCommand(_eventInterp,
+ "::tk::mac::ShowHelp", NULL, 0)) {
[super showHelp:sender];
} else {
int code = Tcl_EvalEx(_eventInterp, "::tk::mac::ShowHelp", -1,
diff --git a/macosx/tkMacOSXTest.c b/macosx/tkMacOSXTest.c
index 7d2b24e..1882ce6 100644
--- a/macosx/tkMacOSXTest.c
+++ b/macosx/tkMacOSXTest.c
@@ -18,8 +18,8 @@
* Forward declarations of procedures defined later in this file:
*/
-static int DebuggerCmd (ClientData dummy, Tcl_Interp *interp,
- int argc, const char **argv);
+static int DebuggerObjCmd (ClientData dummy, Tcl_Interp *interp,
+ int objc, Tcl_Obj *const objv[]);
/*
*----------------------------------------------------------------------
@@ -46,7 +46,7 @@ TkplatformtestInit(
* Add commands for platform specific tests on MacOS here.
*/
- Tcl_CreateCommand(interp, "debugger", DebuggerCmd,
+ Tcl_CreateObjCommand(interp, "debugger", DebuggerObjCmd,
(ClientData) 0, (Tcl_CmdDeleteProc *) NULL);
return TCL_OK;
@@ -55,7 +55,7 @@ TkplatformtestInit(
/*
*----------------------------------------------------------------------
*
- * DebuggerCmd --
+ * DebuggerObjCmd --
*
* This procedure simply calls the low level debugger.
*
@@ -69,11 +69,11 @@ TkplatformtestInit(
*/
static int
-DebuggerCmd(
+DebuggerObjCmd(
ClientData clientData, /* Not used. */
Tcl_Interp *interp, /* Not used. */
- int argc, /* Not used. */
- const char **argv) /* Not used. */
+ int objc, /* Not used. */
+ Tcl_Obj *const objv[]) /* Not used. */
{
Debugger();
return TCL_OK;
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c
index 9402cbb..2e4a683 100644
--- a/macosx/tkMacOSXWindowEvent.c
+++ b/macosx/tkMacOSXWindowEvent.c
@@ -266,9 +266,8 @@ extern NSString *opaqueTag;
const char *cmd = ([[notification name] isEqualToString:
NSApplicationDidUnhideNotification] ?
"::tk::mac::OnShow" : "::tk::mac::OnHide");
- Tcl_CmdInfo dummy;
- if (_eventInterp && Tcl_GetCommandInfo(_eventInterp, cmd, &dummy)) {
+ if (_eventInterp && Tcl_FindCommand(_eventInterp, cmd, NULL, 0)) {
int code = Tcl_EvalEx(_eventInterp, cmd, -1, TCL_EVAL_GLOBAL);
if (code != TCL_OK) {
diff --git a/unix/tkUnixEmbed.c b/unix/tkUnixEmbed.c
index 8a4c368..7f3f94b 100644
--- a/unix/tkUnixEmbed.c
+++ b/unix/tkUnixEmbed.c
@@ -867,8 +867,8 @@ int
TkpTestembedCmd(
ClientData clientData, /* Main window for application. */
Tcl_Interp *interp, /* Current interpreter. */
- int argc, /* Number of arguments. */
- const char **argv) /* Argument strings. */
+ int objc, /* Number of arguments. */
+ Tcl_Obj *const objv[]) /* Argument strings. */
{
int all;
Container *containerPtr;
@@ -877,7 +877,7 @@ TkpTestembedCmd(
ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
- if ((argc > 1) && (strcmp(argv[1], "all") == 0)) {
+ if ((objc > 1) && (strcmp(Tcl_GetString(objv[1]), "all") == 0)) {
all = 1;
} else {
all = 0;
diff --git a/win/tkWinEmbed.c b/win/tkWinEmbed.c
index a908a1f..42809cc 100644
--- a/win/tkWinEmbed.c
+++ b/win/tkWinEmbed.c
@@ -101,8 +101,8 @@ int
TkpTestembedCmd(
ClientData clientData,
Tcl_Interp *interp,
- int argc,
- const char **argv)
+ int objc,
+ Tcl_Obj *const objv[])
{
return TCL_OK;
}