diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-09-06 10:13:03 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-09-06 10:13:03 -0300 |
commit | 88866208f079b5ece7b7a1ea899a4d354c7695db (patch) | |
tree | 3c53917375fca703bf327e1922a2cd8200e3c9f0 | |
parent | 7d365a5c7ab01d3d4d2694c88b20e4d908619901 (diff) | |
download | lua-88866208f079b5ece7b7a1ea899a4d354c7695db.tar.gz lua-88866208f079b5ece7b7a1ea899a4d354c7695db.tar.bz2 lua-88866208f079b5ece7b7a1ea899a4d354c7695db.zip |
`luaL_arg_check' always has an `extramsg'.
-rw-r--r-- | lauxlib.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lauxlib.c,v 1.17 1999/03/11 18:59:19 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.18 1999/08/16 20:52:00 roberto Exp roberto $ |
3 | ** Auxiliary functions for building Lua libraries | 3 | ** Auxiliary functions for building Lua libraries |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -35,11 +35,8 @@ void luaL_argerror (int numarg, const char *extramsg) { | |||
35 | numarg -= lua_nups(f); | 35 | numarg -= lua_nups(f); |
36 | if (funcname == NULL) | 36 | if (funcname == NULL) |
37 | funcname = "?"; | 37 | funcname = "?"; |
38 | if (extramsg == NULL) | 38 | luaL_verror("bad argument #%d to function `%.50s' (%.100s)", |
39 | luaL_verror("bad argument #%d to function `%.50s'", numarg, funcname); | 39 | numarg, funcname, extramsg); |
40 | else | ||
41 | luaL_verror("bad argument #%d to function `%.50s' (%.100s)", | ||
42 | numarg, funcname, extramsg); | ||
43 | } | 40 | } |
44 | 41 | ||
45 | const char *luaL_check_lstr (int numArg, long *len) { | 42 | const char *luaL_check_lstr (int numArg, long *len) { |