diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-09-24 15:01:58 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-09-24 15:01:58 (GMT) |
commit | c1d2b9d95856fe913236eec23533b0bd522726d3 (patch) | |
tree | d2205c21c6895c4707b37d72ce3afbc98f0d3b4c /generic/tkCmds.c | |
parent | 93a3e63b7e9a22f94f1101b7ba32ac79738e5b65 (diff) | |
download | tk-c1d2b9d95856fe913236eec23533b0bd522726d3.zip tk-c1d2b9d95856fe913236eec23533b0bd522726d3.tar.gz tk-c1d2b9d95856fe913236eec23533b0bd522726d3.tar.bz2 |
Don't use "class" as (internal) struct field name or local variable name. Make it "c_class" (just as X11 does as well), in order to prevent conflict with C++ compilers.
Diffstat (limited to 'generic/tkCmds.c')
-rw-r--r-- | generic/tkCmds.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/generic/tkCmds.c b/generic/tkCmds.c index a64d2e1..8ba05f0 100644 --- a/generic/tkCmds.c +++ b/generic/tkCmds.c @@ -1285,7 +1285,7 @@ Tk_WinfoObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - int index, x, y, width, height, useX, useY, class, skip; + int index, x, y, width, height, useX, useY, c_class, skip; const char *string; TkWindow *winPtr; Tk_Window tkwin = clientData; @@ -1496,7 +1496,7 @@ Tk_WinfoObjCmd( Tcl_NewIntObj(WidthMMOfScreen(Tk_Screen(tkwin)))); break; case WIN_SCREENVISUAL: - class = DefaultVisualOfScreen(Tk_Screen(tkwin))->class; + c_class = DefaultVisualOfScreen(Tk_Screen(tkwin))->c_class; goto visual; case WIN_SERVER: TkGetServerInfo(interp, tkwin); @@ -1524,10 +1524,10 @@ Tk_WinfoObjCmd( break; } case WIN_VISUAL: - class = Tk_Visual(tkwin)->class; + c_class = Tk_Visual(tkwin)->c_class; visual: - string = TkFindStateString(visualMap, class); + string = TkFindStateString(visualMap, c_class); if (string == NULL) { string = "unknown"; } @@ -1790,15 +1790,15 @@ Tk_WinfoObjCmd( } resultPtr = Tcl_NewObj(); for (i = 0; i < count; i++) { - string = TkFindStateString(visualMap, visInfoPtr[i].class); + string = TkFindStateString(visualMap, visInfoPtr[i].c_class); if (string == NULL) { strcpy(buf, "unknown"); } else { sprintf(buf, "%s %d", string, visInfoPtr[i].depth); } if (includeVisualId) { - sprintf(visualIdString, " 0x%x", - (unsigned) visInfoPtr[i].visualid); + sprintf(visualIdString, " 0x%lx", + (unsigned long) visInfoPtr[i].visualid); strcat(buf, visualIdString); } strPtr = Tcl_NewStringObj(buf, -1); |