summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2023-05-03 04:03:36 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2023-05-03 04:03:36 (GMT)
commit81b4fa2fbd9f060519ac3bbe6ab763d27474a204 (patch)
tree0fb1edcb76cf380394c4ccb4a814036da052b0da /generic/tclInt.h
parent41aa17e3893424a090a9216fe9f8aca38b6bf584 (diff)
downloadtcl-81b4fa2fbd9f060519ac3bbe6ab763d27474a204.zip
tcl-81b4fa2fbd9f060519ac3bbe6ab763d27474a204.tar.gz
tcl-81b4fa2fbd9f060519ac3bbe6ab763d27474a204.tar.bz2
Changed CHANNEL_PROFILE_* to ENCODING_PROFILE_* and moved out of tclIO.h. See below.
For whatever reason, these macros were renamed and moved to tclIO.h post-660. This is inappropriate as those macros deal with *encoding* flags, not *channel* flags and have relevance outside of I/O making their renaming inappropriate. Further putting them in tclIO.h forces inclusion of that header in modules that do not otherwise need that header.
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r--generic/tclInt.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h
index c8ea609..8f87523 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -2855,6 +2855,22 @@ typedef struct ProcessGlobalValue {
#define TCL_PARSE_NO_UNDERSCORE 128
/* Reject underscore digit separator */
+
+/*
+ *----------------------------------------------------------------------
+ * Internal convenience macros for manipulating encoding flags. See
+ * TCL_ENCODING_PROFILE_* in tcl.h
+ *----------------------------------------------------------------------
+ */
+
+#define ENCODING_PROFILE_MASK 0xFF000000
+#define ENCODING_PROFILE_GET(flags_) ((flags_) & ENCODING_PROFILE_MASK)
+#define ENCODING_PROFILE_SET(flags_, profile_) \
+ do { \
+ (flags_) &= ~ENCODING_PROFILE_MASK; \
+ (flags_) |= profile_; \
+ } while (0)
+
/*
*----------------------------------------------------------------
* Variables shared among Tcl modules but not used by the outside world.