[issue22136] Fix _tkinter compiler warnings on MSVC

2014-08-05 Thread Zachary Ware
Zachary Ware added the comment: Done and done. Thank you very much, Martin. -- ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue22136] Fix _tkinter compiler warnings on MSVC

2014-08-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7ed237478fcc by Zachary Ware in branch 'default': Closes #22136: Fix MSVC compiler warnings introduced by #22085 http://hg.python.org/cpython/rev/7ed237478fcc -- nosy: +python-dev resolution: -> fixed stage: commit review -> resolved status

[issue22136] Fix _tkinter compiler warnings on MSVC

2014-08-05 Thread Martin v . Löwis
Martin v. Löwis added the comment: Grepping through the source shows that currently, the const always goes before the type (for char, wchar_t, Py_UCS2, and int). So please do this style adjustment and commit. -- ___ Python tracker

[issue22136] Fix _tkinter compiler warnings on MSVC

2014-08-05 Thread Zachary Ware
Zachary Ware added the comment: I see. There doesn't appear to be anything in PEP 7 about this; do we have a style preference for this that applies here? Or should I just shut up and commit it? :) -- ___ Python tracker

[issue22136] Fix _tkinter compiler warnings on MSVC

2014-08-05 Thread Martin v . Löwis
Martin v. Löwis added the comment: "const T" and "T const" are the same type. This compiles, and all variables have the same type: int main() { const volatile int a; const int volatile b; int const volatile c; volatile int const d; volatile int const etc; } Even "volatile short const

[issue22136] Fix _tkinter compiler warnings on MSVC

2014-08-05 Thread Zachary Ware
Zachary Ware added the comment: Thank you both for the reviews! Embarrassingly, I just realized that I didn't post the patch I meant to; in quickly reconstructing the patch after accidentally destroying a previous version, I made it "Tcl_ObjType const *SomeType;" instead of "const Tcl_ObjType

[issue22136] Fix _tkinter compiler warnings on MSVC

2014-08-05 Thread Martin v . Löwis
Martin v. Löwis added the comment: I see. So the patch is fine indeed. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue22136] Fix _tkinter compiler warnings on MSVC

2014-08-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Serhiy: See > http://svn.python.org/projects/external/tcl-8.6.1.0/generic/tclDecls.h > where it now is > EXTERN CONST86 Tcl_ObjType * Tcl_GetObjType(const char *typeName); Oh, my fault. I did not notice that my tcl workspace was switched to 8.3 branch. > I

[issue22136] Fix _tkinter compiler warnings on MSVC

2014-08-05 Thread Martin v . Löwis
Martin v. Löwis added the comment: Serhiy: See http://svn.python.org/projects/external/tcl-8.6.1.0/generic/tclDecls.h where it now is EXTERN CONST86 Tcl_ObjType * Tcl_GetObjType(const char *typeName); I think the patch is wrong as it stands, as "const" is not a reserved word in C89. Instead,

[issue22136] Fix _tkinter compiler warnings on MSVC

2014-08-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm surprised that this caused a warning. In man page Tcl_GetObjType() is described as Tcl_ObjType * Tcl_GetObjType(typeName) and in header file it is declared as EXTERN Tcl_ObjType *Tcl_GetObjType _ANSI_ARGS_((char * typeName)); Tcl_ObjTy

[issue22136] Fix _tkinter compiler warnings on MSVC

2014-08-04 Thread Zachary Ware
New submission from Zachary Ware: Dropping support of Tk 8.3 caused a few compiler warnings on Windows: ..\Modules\_tkinter.c(587): warning C4090: '=' : different 'const' qualifiers ..\Modules\_tkinter.c(588): warning C4090: '=' : different 'const' qualifiers ..\Modules\_tkinter.c(589): wa