зеркало из https://github.com/mozilla/pjs.git
Another place where error reporting hadn't caught up to 16-bit
character strings; added a js_DeflateString call. Thanks to gcc 2.8.1 for catching this - it complained about "char format, different type arg (arg 4)" - which means that it looked in the (printf-style) format string and checked type against it. Wow.
This commit is contained in:
Родитель
a4b3627745
Коммит
cc35c93a1f
|
@ -514,7 +514,10 @@ js_ReportCompileError(JSContext *cx, JSTokenStream *ts, const char *format,
|
|||
fprintf(stderr, "%s, ", ts->filename);
|
||||
if (ts->lineno)
|
||||
fprintf(stderr, "line %u: ", ts->lineno);
|
||||
fprintf(stderr, "%s:\n%s\n", message, ts->linebuf.base);
|
||||
fprintf(stderr, "%s:\n%s\n",message,
|
||||
js_DeflateString(cx, ts->linebuf.base,
|
||||
ts->linebuf.limit - ts->linebuf.base));
|
||||
|
||||
#endif
|
||||
}
|
||||
if (lastc == '\n')
|
||||
|
|
|
@ -518,7 +518,10 @@ js_ReportCompileError(JSContext *cx, JSTokenStream *ts, const char *format,
|
|||
fprintf(stderr, "%s, ", ts->filename);
|
||||
if (ts->lineno)
|
||||
fprintf(stderr, "line %u: ", ts->lineno);
|
||||
fprintf(stderr, "%s:\n%s\n", message, ts->linebuf.base);
|
||||
fprintf(stderr, "%s:\n%s\n",message,
|
||||
js_DeflateString(cx, ts->linebuf.base,
|
||||
ts->linebuf.limit - ts->linebuf.base));
|
||||
|
||||
#endif
|
||||
}
|
||||
if (lastc == '\n')
|
||||
|
|
Загрузка…
Ссылка в новой задаче