diff options
author | das <das> | 2007-10-15 07:24:47 (GMT) |
---|---|---|
committer | das <das> | 2007-10-15 07:24:47 (GMT) |
commit | efc99bc15db0e9e7a9b41476cff1119112348d7b (patch) | |
tree | 67915c083365997a60c6f2e4622f437540598f6d /generic/ttk | |
parent | 95b981bcce4ffe3ed7b5b3bf8f48e366955ee383 (diff) | |
download | tk-efc99bc15db0e9e7a9b41476cff1119112348d7b.zip tk-efc99bc15db0e9e7a9b41476cff1119112348d7b.tar.gz tk-efc99bc15db0e9e7a9b41476cff1119112348d7b.tar.bz2 |
* generic/tkArgv.c: Fix gcc warnings about 'cast to/from
* generic/tkCanvUtil.c: pointer from/to integer of different
* generic/tkCanvas.c: size' on 64-bit platforms by casting
* generic/tkCursor.c: to intermediate types
* generic/tkInt.h: intptr_t/uintptr_t via new PTR2INT(),
* generic/tkListbox.c: INT2PTR(), PTR2UINT() and UINT2PTR()
* generic/tkObj.c: macros.
* generic/tkStyle.c:
* generic/tkTextIndex.c:
* generic/tkUtil.c:
* generic/ttk/ttkTheme.h:
* generic/ttk/ttkTreeview.c:
* unix/tkUnixMenu.c:
* unix/configure.in:
* unix/configure: autoconf-2.59
* unix/tkConfig.h.in: autoheader-2.59
Diffstat (limited to 'generic/ttk')
-rw-r--r-- | generic/ttk/ttkTheme.h | 24 | ||||
-rw-r--r-- | generic/ttk/ttkTreeview.c | 6 |
2 files changed, 26 insertions, 4 deletions
diff --git a/generic/ttk/ttkTheme.h b/generic/ttk/ttkTheme.h index 12a471e..1f69a24 100644 --- a/generic/ttk/ttkTheme.h +++ b/generic/ttk/ttkTheme.h @@ -1,4 +1,4 @@ -/* $Id: ttkTheme.h,v 1.8 2006/12/14 19:51:04 jenglish Exp $ +/* $Id: ttkTheme.h,v 1.9 2007/10/15 07:24:49 das Exp $ * Copyright (c) 2003 Joe English. Freely redistributable. * * Declarations for Tk theme engine. @@ -19,6 +19,28 @@ extern "C" { # endif #endif +#ifdef HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +#if !defined(INT2PTR) && !defined(PTR2INT) +# if defined(HAVE_INTPTR_T) || defined(intptr_t) +# define INT2PTR(p) ((void*)(intptr_t)(p)) +# define PTR2INT(p) ((int)(intptr_t)(p)) +# else +# define INT2PTR(p) ((void*)(p)) +# define PTR2INT(p) ((int)(p)) +# endif +#endif +#if !defined(UINT2PTR) && !defined(PTR2UINT) +# if defined(HAVE_UINTPTR_T) || defined(uintptr_t) +# define UINT2PTR(p) ((void*)(uintptr_t)(p)) +# define PTR2UINT(p) ((unsigned int)(uintptr_t)(p)) +# else +# define UINT2PTR(p) ((void*)(p)) +# define PTR2UINT(p) ((unsigned int)(p)) +# endif +#endif + #define TTKAPI MODULE_SCOPE /* Ttk syncs to the Tk version & patchlevel */ diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c index 8d36c60..20ca890 100644 --- a/generic/ttk/ttkTreeview.c +++ b/generic/ttk/ttkTreeview.c @@ -1,4 +1,4 @@ -/* $Id: ttkTreeview.c,v 1.16 2007/04/28 01:22:10 jenglish Exp $ +/* $Id: ttkTreeview.c,v 1.17 2007/10/15 07:24:49 das Exp $ * Copyright (c) 2004, Joe English * * ttk::treeview widget implementation. @@ -518,7 +518,7 @@ static int ColumnIndex(Tcl_Interp *interp, Treeview *tv, Tcl_Obj *columnIDObj) entryPtr = Tcl_FindHashEntry( &tv->tree.columnNames, Tcl_GetString(columnIDObj)); if (entryPtr) { - return (int)Tcl_GetHashValue(entryPtr); + return PTR2INT(Tcl_GetHashValue(entryPtr)); } /* Check for number: @@ -689,7 +689,7 @@ static int TreeviewInitColumns(Tcl_Interp *interp, Treeview *tv) Tcl_HashEntry *entryPtr = Tcl_CreateHashEntry( &tv->tree.columnNames, Tcl_GetString(columnName), &isNew); - Tcl_SetHashValue(entryPtr, i); + Tcl_SetHashValue(entryPtr, INT2PTR(i)); InitColumn(tv->tree.columns + i); Tk_InitOptions( |