aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/lapi.c b/lapi.c
index fa05ca49..87a2abbe 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 1.188 2002/05/06 15:51:41 roberto Exp roberto $ 2** $Id: lapi.c,v 1.189 2002/05/06 19:05:10 roberto Exp roberto $
3** Lua API 3** Lua API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -354,6 +354,13 @@ LUA_API void lua_pushstring (lua_State *L, const char *s) {
354} 354}
355 355
356 356
357LUA_API void lua_vpushstr (lua_State *L, const char *fmt, va_list argp) {
358 lua_lock(L);
359 luaO_vpushstr(L, fmt, argp);
360 lua_unlock(L);
361}
362
363
357LUA_API void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n) { 364LUA_API void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n) {
358 Closure *cl; 365 Closure *cl;
359 lua_lock(L); 366 lua_lock(L);
@@ -514,7 +521,7 @@ LUA_API void lua_setmetatable (lua_State *L, int objindex) {
514 uvalue(obj)->uv.metatable = hvalue(mt); 521 uvalue(obj)->uv.metatable = hvalue(mt);
515 break; 522 break;
516 default: 523 default:
517 luaO_verror(L, "cannot change the meta table of a %.20s", 524 luaO_verror(L, "cannot change the meta table of a %s",
518 luaT_typenames[ttype(obj)]); 525 luaT_typenames[ttype(obj)]);
519 } 526 }
520 lua_unlock(L); 527 lua_unlock(L);