summaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lapi.c b/lapi.c
index 0f0166e5..8ff7bfbd 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1276,10 +1276,8 @@ void lua_setwarnf (lua_State *L, lua_WarnFunction f, void *ud) {
void lua_warning (lua_State *L, const char *msg) {
- lua_WarnFunction wf = G(L)->warnf;
lua_lock(L);
- if (wf != NULL)
- wf(&G(L)->ud_warn, msg);
+ luaE_warning(L, msg);
lua_unlock(L);
}