summaryrefslogtreecommitdiffstats
path: root/generic/tkMenu.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-08-11 21:33:05 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-08-11 21:33:05 (GMT)
commit09fba835c8c9d68042f6fef960c025be7c8c3641 (patch)
tree5e38501bee08c156d14cba01ccef64012a94521b /generic/tkMenu.h
parent1d1ca3a5dde2d56b10fab0dfa5f430b98760de8e (diff)
downloadtk-09fba835c8c9d68042f6fef960c025be7c8c3641.zip
tk-09fba835c8c9d68042f6fef960c025be7c8c3641.tar.gz
tk-09fba835c8c9d68042f6fef960c025be7c8c3641.tar.bz2
More preparation for TIP #494 compatibitly. Add 2 utility functions, which can retreive big strings and ByteArrays without length overflow.
Diffstat (limited to 'generic/tkMenu.h')
-rw-r--r--generic/tkMenu.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/generic/tkMenu.h b/generic/tkMenu.h
index bac51aa..b4269a5 100644
--- a/generic/tkMenu.h
+++ b/generic/tkMenu.h
@@ -68,11 +68,15 @@ typedef struct TkMenuEntry {
Tk_OptionTable optionTable; /* Option table for this menu entry. */
Tcl_Obj *labelPtr; /* Main text label displayed in entry (NULL if
* no label). */
- int labelLength; /* Number of non-NULL characters in label. */
+#if TK_MAJOR_VERSION > 8
+ size_t labelLength; /* Number of non-NULL characters in label. */
+#else
+ unsigned int labelLength; /* Number of non-NULL characters in label. */
+#endif
int state; /* State of button for display purposes:
* normal, active, or disabled. */
int underline; /* Value of -underline option: specifies index
- * of character to underline (<0 means don't
+ * of character to underline (-1 means don't
* underline anything). */
Tcl_Obj *underlinePtr; /* Index of character to underline. */
Tcl_Obj *bitmapPtr; /* Bitmap to display in menu entry, or None.
@@ -89,8 +93,13 @@ typedef struct TkMenuEntry {
Tcl_Obj *accelPtr; /* Accelerator string displayed at right of
* menu entry. NULL means no such accelerator.
* Malloc'ed. */
- int accelLength; /* Number of non-NULL characters in
+#if TK_MAJOR_VERSION > 8
+ size_t accelLength; /* Number of non-NULL characters in
+ * accelerator. */
+#else
+ unsigned int accelLength; /* Number of non-NULL characters in
* accelerator. */
+#endif
int indicatorOn; /* True means draw indicator, false means
* don't draw it. This field is ignored unless
* the entry is a radio or check button. */