summaryrefslogtreecommitdiff
path: root/src/lib_aux.c
diff options
context:
space:
mode:
authorMike Pall <mike>2012-08-26 20:13:23 +0200
committerMike Pall <mike>2012-08-26 20:13:23 +0200
commit774280d9c10315cc2968868128a7eeeacc5c3a30 (patch)
tree1ba0a5d80a9e23ef8bdbbb4b67ce78ad0cda1a2b /src/lib_aux.c
parentc0efa6f00ed757bc05d3a0874f98c91fcb88dc68 (diff)
downloadluajit-774280d9c10315cc2968868128a7eeeacc5c3a30.tar.gz
luajit-774280d9c10315cc2968868128a7eeeacc5c3a30.tar.bz2
luajit-774280d9c10315cc2968868128a7eeeacc5c3a30.zip
Replace some trivial uses of fprintf() with fputs.
Diffstat (limited to 'src/lib_aux.c')
-rw-r--r--src/lib_aux.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib_aux.c b/src/lib_aux.c
index 104888bd..f25ab65a 100644
--- a/src/lib_aux.c
+++ b/src/lib_aux.c
@@ -314,8 +314,11 @@ LUALIB_API int luaL_loadstring(lua_State *L, const char *s)
314 314
315static int panic(lua_State *L) 315static int panic(lua_State *L)
316{ 316{
317 fprintf(stderr, "PANIC: unprotected error in call to Lua API (%s)\n", 317 const char *s = lua_tostring(L, -1);
318 lua_tostring(L, -1)); 318 fputs("PANIC: unprotected error in call to Lua API (", stderr);
319 fputs(s ? s : "?", stderr);
320 fputc(')', stderr); fputc('\n', stderr);
321 fflush(stderr);
319 return 0; 322 return 0;
320} 323}
321 324
@@ -366,7 +369,7 @@ LUALIB_API lua_State *luaL_newstate(void)
366LUA_API lua_State *lua_newstate(lua_Alloc f, void *ud) 369LUA_API lua_State *lua_newstate(lua_Alloc f, void *ud)
367{ 370{
368 UNUSED(f); UNUSED(ud); 371 UNUSED(f); UNUSED(ud);
369 fprintf(stderr, "Must use luaL_newstate() for 64 bit target\n"); 372 fputs("Must use luaL_newstate() for 64 bit target\n", stderr);
370 return NULL; 373 return NULL;
371} 374}
372#endif 375#endif