diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-02-02 16:42:18 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-02-02 16:42:18 (GMT) |
commit | 7b1d345686119335c547557b1029df64b0d3c5c5 (patch) | |
tree | 8201fc1d5d17b553df04bb16d46586e2e30e94f7 /generic | |
parent | 3311ca7d306a1bf7de8e03bac9eac81d63677899 (diff) | |
download | tcl-7b1d345686119335c547557b1029df64b0d3c5c5.zip tcl-7b1d345686119335c547557b1029df64b0d3c5c5.tar.gz tcl-7b1d345686119335c547557b1029df64b0d3c5c5.tar.bz2 |
Change DEFAULT_PRIMARY_PROMPT from #define to static const string (saves a strlen() call)
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclMain.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclMain.c b/generic/tclMain.c index 30a206f..3f72838 100644 --- a/generic/tclMain.c +++ b/generic/tclMain.c @@ -28,7 +28,7 @@ * The default prompt used when the user has not overridden it. */ -#define DEFAULT_PRIMARY_PROMPT "% " +static const char DEFAULT_PRIMARY_PROMPT[] = "% "; /* * This file can be compiled on Windows in UNICODE mode, as well as on all @@ -887,7 +887,7 @@ Prompt( chan = Tcl_GetStdChannel(TCL_STDOUT); if (chan != NULL) { Tcl_WriteChars(chan, DEFAULT_PRIMARY_PROMPT, - strlen(DEFAULT_PRIMARY_PROMPT)); + sizeof(DEFAULT_PRIMARY_PROMPT) - 1); } } } else { |