[Python-checkins] python/dist/src/Modules _tkinter.c,1.138,1.139

loewis@users.sourceforge.net loewis@users.sourceforge.net
Mon, 30 Dec 2002 10:14:17 -0800


Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv2893

Modified Files:
	_tkinter.c 
Log Message:
Silence cast warnings for Tcl 8.3.


Index: _tkinter.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v
retrieving revision 1.138
retrieving revision 1.139
diff -C2 -d -r1.138 -r1.139
*** _tkinter.c	28 Dec 2002 09:23:09 -0000	1.138
--- _tkinter.c	30 Dec 2002 18:14:15 -0000	1.139
***************
*** 58,61 ****
--- 58,67 ----
  #endif
  
+ /* For Tcl 8.2 and 8.3, CONST* is not defined. */
+ #ifndef CONST84_RETURN
+ #define CONST84_RETURN
+ #define CONST
+ #endif
+ 
  #define TKMAJORMINOR (TK_MAJOR_VERSION*1000 + TK_MINOR_VERSION)
  
***************
*** 1350,1356 ****
  TCL_DECLARE_MUTEX(var_mutex)
  
! typedef const char* (*EventFunc1)(Tcl_Interp*, const char*, int);
! typedef const char* (*EventFunc2)(Tcl_Interp*, const char*, const char*, int);
! typedef const char* (*EventFunc3)(Tcl_Interp*, const char*, const char*, const char*, int);
  typedef struct VarEvent {
  	Tcl_Event ev; /* must be first */
--- 1356,1362 ----
  TCL_DECLARE_MUTEX(var_mutex)
  
! typedef CONST84_RETURN char* (*EventFunc1)(Tcl_Interp*, CONST char*, int);
! typedef CONST84_RETURN char* (*EventFunc2)(Tcl_Interp*, CONST char*, CONST char*, int);
! typedef CONST84_RETURN char* (*EventFunc3)(Tcl_Interp*, CONST char*, CONST char*, CONST char*, int);
  typedef struct VarEvent {
  	Tcl_Event ev; /* must be first */
***************
*** 1469,1475 ****
  static PyObject*
  var_invoke2(PyObject *_self, char* arg1, char* arg2, char* arg3, int flags,
! 	   int (*func1)(Tcl_Interp*, const char*, int),
! 	   int (*func2)(Tcl_Interp*, const char*, const char*, int),
! 	   int (*func3)(Tcl_Interp*, const char*, const char*, const char*, int))
  {
  	return var_invoke(_self, arg1, arg2, arg3, flags,
--- 1475,1481 ----
  static PyObject*
  var_invoke2(PyObject *_self, char* arg1, char* arg2, char* arg3, int flags,
! 	   int (*func1)(Tcl_Interp*, CONST char*, int),
! 	   int (*func2)(Tcl_Interp*, CONST char*, CONST char*, int),
! 	   int (*func3)(Tcl_Interp*, CONST char*, CONST char*, CONST char*, int))
  {
  	return var_invoke(_self, arg1, arg2, arg3, flags,