pic_debug family return obj

This commit is contained in:
Yuichi Nishiwaki 2014-02-11 13:38:42 +09:00
parent 372fd3157b
commit b404f30a50
2 changed files with 6 additions and 5 deletions

View File

@ -212,8 +212,8 @@ void pic_warn(pic_state *, const char *);
const char *pic_errmsg(pic_state *);
void pic_debug(pic_state *, pic_value);
void pic_fdebug(pic_state *, pic_value, XFILE *);
pic_value pic_debug(pic_state *, pic_value);
pic_value pic_fdebug(pic_state *, pic_value, XFILE *);
#if defined(__cplusplus)
}

View File

@ -154,17 +154,18 @@ write(pic_state *pic, pic_value obj, XFILE *file)
}
}
void
pic_value
pic_debug(pic_state *pic, pic_value obj)
{
pic_fdebug(pic, obj, xstdout);
return pic_fdebug(pic, obj, xstdout);
}
void
pic_value
pic_fdebug(pic_state *pic, pic_value obj, XFILE *file)
{
write(pic, obj, file);
xfflush(file);
return obj;
}
static pic_value