diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-02-14 14:25:08 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-02-14 14:25:08 (GMT) |
commit | a13289725c7144cf1453ac5a3674bf763450872c (patch) | |
tree | 93dec91a6282b71292e6883ab6588a968670e933 /generic/tcl.h | |
parent | 8fb5bb0f202daaf8e2a31c2bf6e69381d206c021 (diff) | |
download | tcl-a13289725c7144cf1453ac5a3674bf763450872c.zip tcl-a13289725c7144cf1453ac5a3674bf763450872c.tar.gz tcl-a13289725c7144cf1453ac5a3674bf763450872c.tar.bz2 |
On Windows, Cygwin and 64-bit platforms, no need to handle 'long' in tclLink.c, since its size is equal to either 'int' or 'Tcl_WideInt'. This enhances interoperabilty between win64 extensions loaded in cygwin64 using Tcl_LinkVar(), whill still being 100% compatible.
init.tcl: unnecessary spacing.
Diffstat (limited to 'generic/tcl.h')
-rw-r--r-- | generic/tcl.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index c0cee27..d678229 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -1147,8 +1147,13 @@ typedef struct Tcl_DString { #define TCL_LINK_SHORT 8 #define TCL_LINK_USHORT 9 #define TCL_LINK_UINT 10 +#if defined(TCL_WIDE_INT_IS_LONG) || defined(_WIN32) || defined(__CYGWIN__) +#define TCL_LINK_LONG ((sizeof(long) != sizeof(int)) ? TCL_LINK_WIDE_INT : TCL_LINK_INT) +#define TCL_LINK_ULONG ((sizeof(long) != sizeof(int)) ? TCL_LINK_WIDE_UINT : TCL_LINK_UINT) +#else #define TCL_LINK_LONG 11 #define TCL_LINK_ULONG 12 +#endif #define TCL_LINK_FLOAT 13 #define TCL_LINK_WIDE_UINT 14 #define TCL_LINK_READ_ONLY 0x80 |