diff options
author | apnadkarni <apnmbx-wits@yahoo.com> | 2023-05-03 03:31:49 (GMT) |
---|---|---|
committer | apnadkarni <apnmbx-wits@yahoo.com> | 2023-05-03 03:31:49 (GMT) |
commit | 7b688527d719054d95ce6e5313830d6dd9d50a25 (patch) | |
tree | b4a8782c203ed60e376b9d3f10563a174dc3ed50 /generic/tclInt.h | |
parent | 2dccd2a5670532686cbe9da74ccf8e2ce591a20b (diff) | |
download | tcl-7b688527d719054d95ce6e5313830d6dd9d50a25.zip tcl-7b688527d719054d95ce6e5313830d6dd9d50a25.tar.gz tcl-7b688527d719054d95ce6e5313830d6dd9d50a25.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.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h index 2d3a0fc..d3b2548 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -2860,6 +2860,21 @@ typedef struct ProcessGlobalValue { /* 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. *---------------------------------------------------------------- |