TCL9: CONST84 removal (all current compilers support const keyword)
Legacy compiler support macro provided by TCL from a time when 'const' did not exist. This looks like it was put in place around the time of TCL 8.4 (from 2002 until 2013) which introduced APIs with 'const' types, that were previously non-const. Probably due to legacy compiler support across target platforms at the time. Since the minimum TCL level is hardwired to 8.5 (from 2007 until 2016) it does not seem like that compatiblity is a current requirement.
This commit is contained in:
parent
2066077c4e
commit
e27b8a9d19
|
|
@ -895,7 +895,7 @@ ImgLayerConfigureMaster(masterPtr, objc, objv, flags)
|
|||
argv[objc] = NULL;
|
||||
|
||||
if (Tk_ConfigureWidget(masterPtr->interp, Tk_MainWindow(masterPtr->interp),
|
||||
configSpecs, objc, (CONST84 char **)argv, (char *) masterPtr, flags)
|
||||
configSpecs, objc, (const char **)argv, (char *) masterPtr, flags)
|
||||
!= TCL_OK) {
|
||||
Tcl_Free((char *) argv);
|
||||
return TCL_ERROR;
|
||||
|
|
@ -1225,7 +1225,7 @@ ImgLayerCmd(clientData, interp, objc, objv)
|
|||
Tcl_WrongNumArgs(interp, 1, objv, "option ?arg arg ...?");
|
||||
return TCL_ERROR;
|
||||
}
|
||||
if (Tcl_GetIndexFromObj(interp, objv[1], (CONST84 char **)layerOptions,
|
||||
if (Tcl_GetIndexFromObj(interp, objv[1], (const char **)layerOptions,
|
||||
"option", 0, &index) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -336,7 +336,7 @@ _tcl_dispatch(ClientData clientData,
|
|||
if (!strncmp(argv0, "::", 2)) argv0 += 2;
|
||||
|
||||
objv0 = Tcl_NewStringObj(argv0, strlen(argv0));
|
||||
if (Tcl_GetIndexFromObj(interp, objv0, (CONST84 char **)conflicts,
|
||||
if (Tcl_GetIndexFromObj(interp, objv0, (const char **)conflicts,
|
||||
"overloaded command", 0, &idx) == TCL_OK)
|
||||
{
|
||||
int i;
|
||||
|
|
@ -636,7 +636,7 @@ _magic_flags(ClientData clientData,
|
|||
Tcl_WrongNumArgs(interp, 1, objv, "flag ?value?");
|
||||
return TCL_ERROR;
|
||||
}
|
||||
if (Tcl_GetIndexFromObj(interp, objv[1], (CONST84 char **)flagOptions,
|
||||
if (Tcl_GetIndexFromObj(interp, objv[1], (const char **)flagOptions,
|
||||
"option", 0, &index) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
|
@ -664,7 +664,7 @@ _magic_flags(ClientData clientData,
|
|||
Tcl_SetObjResult(interp, Tcl_NewBooleanObj(value));
|
||||
}
|
||||
else {
|
||||
if (Tcl_GetIndexFromObj(interp, objv[2], (CONST84 char **)yesNo,
|
||||
if (Tcl_GetIndexFromObj(interp, objv[2], (const char **)yesNo,
|
||||
"value", 0, &index2) != TCL_OK)
|
||||
return TCL_ERROR;
|
||||
|
||||
|
|
|
|||
|
|
@ -28,11 +28,5 @@ extern int TagVerify();
|
|||
extern int Tcl_printf();
|
||||
extern void MakeWindowCommand();
|
||||
|
||||
/* Backward compatibility issues */
|
||||
#ifndef CONST84
|
||||
#define CONST84 /* indicates something was changed to "const" */
|
||||
/* in Tcl version 8.4. */
|
||||
#endif
|
||||
|
||||
#endif /* MAGIC_WRAPPER */
|
||||
#endif /* _TCLMAGIC_H */
|
||||
|
|
|
|||
Loading…
Reference in New Issue