webmcp

changeset 272:a533ab6d7337

Register mondelefant.class_prototype.get_reference(...) and mondelefant.class_prototype.get_foreign_key_reference_name(...) functions in mondelefant_native.c for use through Lua code
author jbe
date Fri Mar 20 16:58:31 2015 +0100 (2015-03-20)
parents d6bcb9eadd39
children 5ff8d300817b
files libraries/mondelefant/mondelefant_native.autodoc.lua libraries/mondelefant/mondelefant_native.c
line diff
     1.1 --- a/libraries/mondelefant/mondelefant_native.autodoc.lua	Fri Mar 20 16:46:09 2015 +0100
     1.2 +++ b/libraries/mondelefant/mondelefant_native.autodoc.lua	Fri Mar 20 16:58:31 2015 +0100
     1.3 @@ -243,7 +243,7 @@
     1.4    name                     -- reference name
     1.5  )
     1.6  
     1.7 -This function performs a lookup for the given name in the "reference" table. Prototypes are used, when lookup was unsuccessful.
     1.8 +This function performs a lookup for the given name in the "reference" table. Prototypes are used when lookup was unsuccessful.
     1.9  
    1.10  --]]--
    1.11  -- implemented in mondelefant_native.c as
    1.12 @@ -257,7 +257,7 @@
    1.13    foreign_key                               -- foreign key
    1.14  )
    1.15  
    1.16 -This function performs a lookup for the given name in the "foreign_keys" table. Prototypes are used, when lookup was unsuccessful.
    1.17 +This function performs a lookup for the given name in the "foreign_keys" table. Prototypes are used when lookup was unsuccessful.
    1.18  
    1.19  --]]--
    1.20  -- implemented in mondelefant_native.c as
     2.1 --- a/libraries/mondelefant/mondelefant_native.c	Fri Mar 20 16:46:09 2015 +0100
     2.2 +++ b/libraries/mondelefant/mondelefant_native.c	Fri Mar 20 16:58:31 2015 +0100
     2.3 @@ -1813,6 +1813,11 @@
     2.4    lua_setfield(L, 1, "class_metatable");
     2.5  
     2.6    lua_newtable(L);  // 2
     2.7 +#if LUA_VERSION_NUM >= 502
     2.8 +  luaL_setfuncs(L, mondelefant_class_methods, 0);
     2.9 +#else
    2.10 +  luaL_register(L, NULL, mondelefant_class_methods);
    2.11 +#endif
    2.12    lua_newtable(L);  // 3
    2.13  #if LUA_VERSION_NUM >= 502
    2.14    luaL_setfuncs(L, mondelefant_object_methods, 0);

Impressum / About Us