diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-09-27 19:57:12 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-09-27 19:57:12 (GMT) |
commit | 8f322a9a76167ba73176eeee528dd5949d3a8d27 (patch) | |
tree | c1226b3271372ba38cba54f9eee61a54cb14cab6 /generic | |
parent | fef719c8b25c20a5813df46568b14d73f4670dbf (diff) | |
parent | 091178b345c21c048afcb7883ad35a1f86134a8d (diff) | |
download | tk-8f322a9a76167ba73176eeee528dd5949d3a8d27.zip tk-8f322a9a76167ba73176eeee528dd5949d3a8d27.tar.gz tk-8f322a9a76167ba73176eeee528dd5949d3a8d27.tar.bz2 |
Only use one of XPutImage/TkPutImage, dependant on platform. Both are present in stub table, for backwards compatibility
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkCursor.c | 2 | ||||
-rw-r--r-- | generic/tkInt.h | 5 | ||||
-rw-r--r-- | generic/tkIntXlibDecls.h | 10 | ||||
-rw-r--r-- | generic/tkStubInit.c | 3 |
4 files changed, 13 insertions, 7 deletions
diff --git a/generic/tkCursor.c b/generic/tkCursor.c index 76bbc89..6bdfa9d 100644 --- a/generic/tkCursor.c +++ b/generic/tkCursor.c @@ -425,7 +425,7 @@ Tk_NameOfCursor( if (!dispPtr->cursorInit) { printid: - sprintf(dispPtr->cursorString, "cursor id %p", cursor); + sprintf(dispPtr->cursorString, "cursor id 0x%" TCL_Z_MODIFIER "x", (size_t)cursor); return dispPtr->cursorString; } idHashPtr = Tcl_FindHashEntry(&dispPtr->cursorIdTable, cursor); diff --git a/generic/tkInt.h b/generic/tkInt.h index 82dc1b3..953491d 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -1330,11 +1330,6 @@ MODULE_SCOPE void TkRotatePoint(double originX, double originY, double sine, double cosine, double *xPtr, double *yPtr); -#if !defined(_WIN32) && !defined(__CYGWIN__) /* UNIX and MacOSX */ -#undef TkPutImage -#define TkPutImage(colors, ncolors, display, pixels, gc, image, srcx, srcy, destx, desty, width, height) \ - XPutImage(display, pixels, gc, image, srcx, srcy, destx, desty, width, height); -#endif #ifdef _WIN32 #define TkParseColor XParseColor #else diff --git a/generic/tkIntXlibDecls.h b/generic/tkIntXlibDecls.h index 0467008..1522db6 100644 --- a/generic/tkIntXlibDecls.h +++ b/generic/tkIntXlibDecls.h @@ -1661,6 +1661,16 @@ extern const TkIntXlibStubs *tkIntXlibStubsPtr; /* !END!: Do not edit above this line. */ +#if !defined(_WIN32) && !defined(__CYGWIN__) /* UNIX and MacOSX */ +#undef TkPutImage +#define TkPutImage(colors, ncolors, display, pixels, gc, image, srcx, srcy, destx, desty, width, height) \ + XPutImage(display, pixels, gc, image, srcx, srcy, destx, desty, width, height); +#else +#undef XPutImage +#define XPutImage(display, pixels, gc, image, srcx, srcy, destx, desty, width, height) \ + TkPutImage(NULL, 0, display, pixels, gc, image, srcx, srcy, destx, desty, width, height); +#endif + #if defined(MAC_OSX_TK) # undef Cursor # undef Region diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index 43bf2e0..d28810b 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -43,6 +43,7 @@ MODULE_SCOPE const TkStubs tkStubs; #undef Tk_GetStyleFromObj #undef TkWinGetPlatformId #undef TkPutImage +#undef XPutImage #if defined(TK_NO_DEPRECATED) || TCL_MAJOR_VERSION > 8 #define Tk_MainEx 0 @@ -144,7 +145,7 @@ TkpPrintWindowId( * the hex representation of a pointer. */ Window window) /* Window to be printed into buffer. */ { - sprintf(buf, "%#08lx", (unsigned long) (window)); + sprintf(buf, "0x%" TCL_Z_MODIFIER "x", (size_t)window); } int |