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 /win/tkWinWm.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 'win/tkWinWm.c')
-rw-r--r-- | win/tkWinWm.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c index dcafd68..117b539 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -867,21 +867,21 @@ InitWindowClass( if (!initialized) { Tcl_MutexLock(&winWmMutex); if (!initialized) { - WNDCLASSW class; + WNDCLASSW windowClass; initialized = 1; - ZeroMemory(&class, sizeof(WNDCLASSW)); + ZeroMemory(&windowClass, sizeof(WNDCLASSW)); - class.style = CS_HREDRAW | CS_VREDRAW; - class.hInstance = Tk_GetHINSTANCE(); - class.lpszClassName = TK_WIN_TOPLEVEL_CLASS_NAME; - class.lpfnWndProc = WmProc; + windowClass.style = CS_HREDRAW | CS_VREDRAW; + windowClass.hInstance = Tk_GetHINSTANCE(); + windowClass.lpszClassName = TK_WIN_TOPLEVEL_CLASS_NAME; + windowClass.lpfnWndProc = WmProc; if (titlebaricon == NULL) { - class.hIcon = LoadIconW(Tk_GetHINSTANCE(), L"tk"); + windowClass.hIcon = LoadIconW(Tk_GetHINSTANCE(), L"tk"); } else { - class.hIcon = GetIcon(titlebaricon, ICON_BIG); - if (class.hIcon == NULL) { + windowClass.hIcon = GetIcon(titlebaricon, ICON_BIG); + if (windowClass.hIcon == NULL) { return TCL_ERROR; } @@ -892,9 +892,9 @@ InitWindowClass( tsdPtr->iconPtr = titlebaricon; } - class.hCursor = LoadCursorW(NULL, (LPCWSTR)IDC_ARROW); + windowClass.hCursor = LoadCursorW(NULL, (LPCWSTR)IDC_ARROW); - if (!RegisterClassW(&class)) { + if (!RegisterClassW(&windowClass)) { Tcl_Panic("Unable to register TkTopLevel class"); } } |