webmcp

changeset 414:015be25c98dd

Always write to document when "document_column" is set in class
author jbe
date Sat Jan 09 05:30:45 2016 +0100 (2016-01-09)
parents a09a0defb48a
children 0dff5e2f659c
files libraries/mondelefant/mondelefant_native.c
line diff
     1.1 --- a/libraries/mondelefant/mondelefant_native.c	Sat Jan 09 03:30:51 2016 +0100
     1.2 +++ b/libraries/mondelefant/mondelefant_native.c	Sat Jan 09 05:30:45 2016 +0100
     1.3 @@ -1783,22 +1783,14 @@
     1.4      // check proxy access to document in special column:
     1.5      lua_getfield(L, 4, "document_column");  // 6
     1.6      if (lua_toboolean(L, 6)) {
     1.7 -      lua_getfield(L, 1, "_column_info");  // 7
     1.8 -      if (!lua_isnil(L, 7)) {  // TODO: quick fix to avoid problems on document creation
     1.9 -      lua_pushvalue(L, 2);  // 8
    1.10 -      lua_gettable(L, 7);  // 8
    1.11 -      if (!lua_toboolean(L, 8)) {
    1.12 -        lua_settop(L, 6);
    1.13 -        lua_gettable(L, 5);  // 6
    1.14 -        if (lua_isnil(L, 6)) {
    1.15 -          return luaL_error(L, "Cannot write to document column: document is nil");
    1.16 -        }
    1.17 -        lua_pushvalue(L, 2);  // 7
    1.18 -        lua_pushvalue(L, 3);  // 8
    1.19 -        lua_settable(L, 6);
    1.20 -        return 0;
    1.21 +      lua_gettable(L, 5);  // 6
    1.22 +      if (lua_isnil(L, 6)) {
    1.23 +        return luaL_error(L, "Cannot write to document column: document is nil");
    1.24        }
    1.25 -      }  // TODO: quick fix to avoid problems on document creation
    1.26 +      lua_pushvalue(L, 2);  // 7
    1.27 +      lua_pushvalue(L, 3);  // 8
    1.28 +      lua_settable(L, 6);
    1.29 +      return 0;
    1.30      }
    1.31      lua_settop(L, 5);
    1.32      // store value in data field info:

Impressum / About Us