diff options
Diffstat (limited to 'Lib/tcl/tclruntime.swg')
-rw-r--r-- | Lib/tcl/tclruntime.swg | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Lib/tcl/tclruntime.swg b/Lib/tcl/tclruntime.swg index bb4edd745..3b34a76c0 100644 --- a/Lib/tcl/tclruntime.swg +++ b/Lib/tcl/tclruntime.swg @@ -6,6 +6,22 @@ #include <stdlib.h> #include <stdarg.h> #include <ctype.h> + +/* Check, if Tcl version supports Tcl_Size, + which was introduced in Tcl 8.7 and 9. +*/ +#ifndef TCL_SIZE_MAX + #include <limits.h> + #define TCL_SIZE_MAX INT_MAX + + #ifndef Tcl_Size + typedef int Tcl_Size; + #endif + + #define TCL_SIZE_MODIFIER "" + #define Tcl_GetSizeIntFromObj Tcl_GetIntFromObj + #define Tcl_NewSizeIntObj Tcl_NewIntObj +#endif %} %insert(runtime) "swigrun.swg"; /* Common C API type-checking code */ |