mirror of
https://github.com/ccxvii/mujs.git
synced 2026-02-05 17:29:43 +08:00
Bug 701355: Fix separate compilation issues that have crept in.
We normally build as one compilation unit with "one.c" but we should still be able to build each source file as a separate compilation unit if desired.
This commit is contained in:
11
jsrepr.c
11
jsrepr.c
@@ -2,6 +2,8 @@
|
||||
#include "jslex.h"
|
||||
#include "jsvalue.h"
|
||||
#include "jsbuiltin.h"
|
||||
#include "jscompile.h"
|
||||
#include "utf.h"
|
||||
|
||||
static void reprvalue(js_State *J, js_Buffer **sb);
|
||||
|
||||
@@ -193,9 +195,12 @@ static void reprvalue(js_State *J, js_Buffer **sb)
|
||||
if (obj->u.r.flags & JS_REGEXP_M) js_putc(J, sb, 'm');
|
||||
break;
|
||||
case JS_CDATE:
|
||||
js_puts(J, sb, "(new Date(");
|
||||
fmtnum(J, sb, obj->u.number);
|
||||
js_puts(J, sb, "))");
|
||||
{
|
||||
char buf[40];
|
||||
js_puts(J, sb, "(new Date(");
|
||||
js_puts(J, sb, jsV_numbertostring(J, buf, obj->u.number));
|
||||
js_puts(J, sb, "))");
|
||||
}
|
||||
break;
|
||||
case JS_CERROR:
|
||||
js_puts(J, sb, "(new ");
|
||||
|
||||
Reference in New Issue
Block a user