From 526ebe552a464419505f982f6bc500ef6b155b58 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 23 Jan 2024 14:10:35 +0000 Subject: Someone might like to use "long double" in an option table, let's allow that. --- generic/tk.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/generic/tk.h b/generic/tk.h index 4f72009..c2f3447 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -282,16 +282,20 @@ typedef struct Tk_SavedOption { Tcl_Obj *valuePtr; /* The old value of the option, in the form of * a Tcl object; may be NULL if the value was * not saved as an object. */ - double internalForm; /* The old value of the option, in some +#if TCL_MAJOR_VERSION > 8 + long double internalForm; /* The old value of the option, in some * internal representation such as an int or * (XColor *). Valid only if the field * optionPtr->specPtr->objOffset is -1. The * space must be large enough to accommodate a - * double, a long, or a pointer; right now it - * looks like a double (i.e., 8 bytes) is big - * enough. Also, using a double guarantees - * that the field is properly aligned for - * storing large values. */ + * long double, a double, a long, or a pointer; + * right now it looks like a long double (i.e., 16 + * bytes) is big enough. Also, using a long double + * guarantees that the field is properly aligned + * for storing large values. */ +#else + double internalForm; +#endif } Tk_SavedOption; #ifdef TCL_MEM_DEBUG -- cgit v0.12