summaryrefslogtreecommitdiffstats
path: root/generic/tclStringRep.h
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclStringRep.h')
-rw-r--r--generic/tclStringRep.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/generic/tclStringRep.h b/generic/tclStringRep.h
index faa2c2c..bce9092 100644
--- a/generic/tclStringRep.h
+++ b/generic/tclStringRep.h
@@ -31,6 +31,10 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
+
+#ifndef _TCLSTRINGREP
+#define _TCLSTRINGREP
+
/*
* The following structure is the internal rep for a String object. It keeps
@@ -42,15 +46,15 @@
*/
typedef struct {
- int numChars; /* The number of chars in the string. -1 means
- * this value has not been calculated. >= 0
- * means that there is a valid Unicode rep, or
- * that the number of UTF bytes == the number
- * of chars. */
- int allocated; /* The amount of space actually allocated for
+ Tcl_Size numChars; /* The number of chars in the string.
+ * TCL_INDEX_NONE means this value has not been
+ * calculated. Any other means that there is a valid
+ * Unicode rep, or that the number of UTF bytes ==
+ * the number of chars. */
+ Tcl_Size allocated; /* The amount of space actually allocated for
* the UTF string (minus 1 byte for the
* termination char). */
- int maxChars; /* Max number of chars that can fit in the
+ Tcl_Size maxChars; /* Max number of chars that can fit in the
* space allocated for the unicode array. */
int hasUnicode; /* Boolean determining whether the string has
* a Unicode representation. */
@@ -84,6 +88,7 @@ typedef struct {
((objPtr)->internalRep.twoPtrValue.ptr2 = NULL), \
((objPtr)->internalRep.twoPtrValue.ptr1 = (void *) (stringPtr))
+#endif /* _TCLSTRINGREP */
/*
* Local Variables:
* mode: c