summaryrefslogtreecommitdiffstats
path: root/generic/tclEncoding.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-03-22 08:32:10 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-03-22 08:32:10 (GMT)
commit133af7524b7bdfc62eb504a932faef09a0ae03e9 (patch)
treeb390e58f8a2de155a3ad9772da177165e60a0adc /generic/tclEncoding.c
parent0fcb3ce5dcddcc07e9c3f294dc146a4442e9efbb (diff)
downloadtcl-133af7524b7bdfc62eb504a932faef09a0ae03e9.zip
tcl-133af7524b7bdfc62eb504a932faef09a0ae03e9.tar.gz
tcl-133af7524b7bdfc62eb504a932faef09a0ae03e9.tar.bz2
Since TCL_ENCODING_PROFILE_DEFAULT == TCL_ENCODING_PROFILE_TCL8 (on Tcl 8), we can simplify.
Diffstat (limited to 'generic/tclEncoding.c')
-rw-r--r--generic/tclEncoding.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index 7c04a61..fc62d7c 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -200,14 +200,10 @@ static struct TclEncodingProfiles {
{"tcl8", TCL_ENCODING_PROFILE_TCL8},
};
#define PROFILE_STRICT(flags_) \
- ((TCL_ENCODING_PROFILE_GET(flags_) == TCL_ENCODING_PROFILE_STRICT) \
- || (TCL_ENCODING_PROFILE_GET(flags_) == 0 \
- && TCL_ENCODING_PROFILE_DEFAULT == TCL_ENCODING_PROFILE_STRICT))
+ (TCL_ENCODING_PROFILE_GET(flags_) == TCL_ENCODING_PROFILE_STRICT)
#define PROFILE_REPLACE(flags_) \
- ((TCL_ENCODING_PROFILE_GET(flags_) == TCL_ENCODING_PROFILE_REPLACE) \
- || (TCL_ENCODING_PROFILE_GET(flags_) == 0 \
- && TCL_ENCODING_PROFILE_DEFAULT == TCL_ENCODING_PROFILE_REPLACE))
+ (TCL_ENCODING_PROFILE_GET(flags_) == TCL_ENCODING_PROFILE_REPLACE)
#define UNICODE_REPLACE_CHAR ((Tcl_UniChar)0xFFFD)
#define SURROGATE(c_) (((c_) & ~0x7FF) == 0xD800)
@@ -4559,7 +4555,7 @@ int TclEncodingSetProfileFlags(int flags)
break;
case 0: /* Unspecified by caller */
default:
- TCL_ENCODING_PROFILE_SET(flags, TCL_ENCODING_PROFILE_DEFAULT);
+ TCL_ENCODING_PROFILE_SET(flags, TCL_ENCODING_PROFILE_TCL8);
break;
}
}