diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-01-23 14:10:35 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-01-23 14:10:35 (GMT) |
commit | 526ebe552a464419505f982f6bc500ef6b155b58 (patch) | |
tree | 44b23dcd6d2c7df1c2ab254ced8eb1115c8b2558 /generic | |
parent | a1b4ce5f19d0a1eb3b96440f68b8f1e06e45e111 (diff) | |
download | tk-526ebe552a464419505f982f6bc500ef6b155b58.zip tk-526ebe552a464419505f982f6bc500ef6b155b58.tar.gz tk-526ebe552a464419505f982f6bc500ef6b155b58.tar.bz2 |
Someone might like to use "long double" in an option table, let's allow that.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tk.h | 16 |
1 files 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 |