webmcp

diff libraries/json/json.c @ 199:9fd7e1bf9fe3

Require 3 arguments for json.set(...); Completed autodoc documentation for JSON library
author jbe
date Tue Aug 12 01:01:54 2014 +0200 (2014-08-12)
parents 654ddbcc49d0
children 035b58aa430a
line diff
     1.1 --- a/libraries/json/json.c	Mon Aug 11 22:57:23 2014 +0200
     1.2 +++ b/libraries/json/json.c	Tue Aug 12 01:01:54 2014 +0200
     1.3 @@ -710,9 +710,10 @@
     1.4  static int json_set(lua_State *L) {
     1.5    int stacktop;  // stack index of top of stack (after shifting)
     1.6    int idx;       // stack index of current argument to process
     1.7 -  // require at least two arguments:
     1.8 +  // require at least three arguments:
     1.9    luaL_checkany(L, 1);
    1.10    luaL_checkany(L, 2);
    1.11 +  luaL_checkany(L, 3);
    1.12    // insert objectmt into stack at position 1 (shifting the arguments):
    1.13    json_regfetch(L, objectmt);
    1.14    lua_insert(L, 1);

Impressum / About Us