From 3662f8b4e6f4335bd72e14f86e7237d74c595d02 Mon Sep 17 00:00:00 2001 From: Mark Pulford Date: Mon, 25 Apr 2011 15:07:19 +0930 Subject: Tidy Lua arg count verification --- lua_json.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lua_json.c') diff --git a/lua_json.c b/lua_json.c index 10810f0..7dac1b4 100644 --- a/lua_json.c +++ b/lua_json.c @@ -261,7 +261,7 @@ int lua_c_json_encode(lua_State *l) char *json; int len; - lua_ensure_arg_count(l, "lua_c_json_encode", 1); + lua_verify_arg_count(l, 1); json = lua_json_encode(l, &len); @@ -655,7 +655,7 @@ int lua_c_json_decode(lua_State *l) { const char *json; - lua_ensure_arg_count(l, "json_c_json_decode", 1); + lua_verify_arg_count(l, 1); luaL_argcheck(l, lua_islightuserdata(l, 1), 1, "missing lightuserdata"); @@ -671,7 +671,7 @@ static int lua_api_json_decode(lua_State *l) { const char *json; - lua_ensure_arg_count(l, "json.decode", 1); + lua_verify_arg_count(l, 1); json = luaL_checkstring(l, 1); lua_json_decode(l, json); -- cgit v1.2.3-55-g6feb