Ah, thanks. I had sent it off to the core mailing list before I saw your
reply. I keep forgetting about the time zone difference. I sent it in
with a TIP formatted section, in case that was needed.
So, the final version for both quotes and braces could then be (bumping
the # of chars to show before using the ... to say 20 since 10 is likely
too small) and with some extra spacing as you used,
if (src[-1] == '"') {
if (interp != NULL) {
Tcl_Obj *emessage = Tcl_NewStringObj(
"extra characters after close-quote at \"", -1);
Tcl_AppendLimitedToObj(emessage, src, -1, 20, NULL);
Tcl_SetObjResult(interp, emessage);
}
parsePtr->errorType = TCL_PARSE_QUOTE_EXTRA;
} else {
if (interp != NULL) {
Tcl_Obj *emessage = Tcl_NewStringObj(
"extra characters after close-brace at }", -1);
Tcl_AppendLimitedToObj(emessage, src, -1, 20, NULL);
Tcl_SetObjResult(interp, emessage);
}
parsePtr->errorType = TCL_PARSE_BRACE_EXTRA;
}
Since it is using src[-1] to test against the " I surmised that src[0]
would be the first character following the close brace or close quote in
the text being parsed, and when testing it produced the expected result.
Perhaps someone more familiar with the code there would know for certain.
If a TIP is not needed, then was that the right approach, to email it to
the core's email list?