diff options
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -1276,10 +1276,8 @@ void lua_setwarnf (lua_State *L, lua_WarnFunction f, void *ud) { | |||
1276 | 1276 | ||
1277 | 1277 | ||
1278 | void lua_warning (lua_State *L, const char *msg) { | 1278 | void lua_warning (lua_State *L, const char *msg) { |
1279 | lua_WarnFunction wf = G(L)->warnf; | ||
1280 | lua_lock(L); | 1279 | lua_lock(L); |
1281 | if (wf != NULL) | 1280 | luaE_warning(L, msg); |
1282 | wf(&G(L)->ud_warn, msg); | ||
1283 | lua_unlock(L); | 1281 | lua_unlock(L); |
1284 | } | 1282 | } |
1285 | 1283 | ||