summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-01-23 14:10:35 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-01-23 14:10:35 (GMT)
commit526ebe552a464419505f982f6bc500ef6b155b58 (patch)
tree44b23dcd6d2c7df1c2ab254ced8eb1115c8b2558 /generic
parenta1b4ce5f19d0a1eb3b96440f68b8f1e06e45e111 (diff)
downloadtk-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.h16
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