TCL9: Tk_Offset() macro removal

Modern compiler have support for 'offsetof' keyword.
This commit is contained in:
Darryl L. Miles 2024-10-21 09:00:44 +01:00 committed by Tim Edwards
parent 60463e31be
commit d999e20b73
1 changed files with 5 additions and 5 deletions

View File

@ -777,15 +777,15 @@ Tk_ImageType tkLayerImageType = {
static Tk_ConfigSpec configSpecs[] = {
{TK_CONFIG_STRING, "-name", (char *) NULL, (char *) NULL,
(char *) NULL, Tk_Offset(LayerMaster, layerString), TK_CONFIG_NULL_OK},
(char *) NULL, offsetof(LayerMaster, layerString), TK_CONFIG_NULL_OK},
{TK_CONFIG_BOOLEAN, "-disabled", (char *) NULL, (char *) NULL,
(char *) "0", Tk_Offset(LayerMaster, layerOff), 0},
(char *) "0", offsetof(LayerMaster, layerOff), 0},
{TK_CONFIG_INT, "-icon", (char *) NULL, (char *) NULL,
(char *) "-1", Tk_Offset(LayerMaster, layerLock), 0},
(char *) "-1", offsetof(LayerMaster, layerLock), 0},
{TK_CONFIG_INT, "-width", (char *) NULL, (char *) NULL,
(char *) "16", Tk_Offset(LayerMaster, width), 0},
(char *) "16", offsetof(LayerMaster, width), 0},
{TK_CONFIG_INT, "-height", (char *) NULL, (char *) NULL,
(char *) "16", Tk_Offset(LayerMaster, height), 0},
(char *) "16", offsetof(LayerMaster, height), 0},
{TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
(char *) NULL, 0, 0}
};