add pic_fdebug

This commit is contained in:
Yuichi Nishiwaki 2014-02-11 00:47:57 +09:00
parent 7fe109a998
commit 468e1b4d1f
2 changed files with 9 additions and 2 deletions

View File

@ -211,6 +211,7 @@ NORETURN void pic_errorf(pic_state *, const char *, size_t, ...);
void pic_warn(pic_state *, const char *);
void pic_debug(pic_state *, pic_value);
void pic_fdebug(pic_state *, pic_value, XFILE *);
#if defined(__cplusplus)
}

View File

@ -157,8 +157,14 @@ write(pic_state *pic, pic_value obj, XFILE *file)
void
pic_debug(pic_state *pic, pic_value obj)
{
write(pic, obj, xstdout);
xfflush(xstdout);
pic_fdebug(pic, obj, xstdout);
}
void
pic_fdebug(pic_state *pic, pic_value obj, XFILE *file)
{
write(pic, obj, file);
xfflush(file);
}
static pic_value