# HG changeset patch # User jbe # Date 1426867111 -3600 # Node ID a533ab6d7337490f990077f44589180028b1bf16 # Parent d6bcb9eadd3984d6c24659312e03e37e55865f69 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 diff -r d6bcb9eadd39 -r a533ab6d7337 libraries/mondelefant/mondelefant_native.autodoc.lua --- a/libraries/mondelefant/mondelefant_native.autodoc.lua Fri Mar 20 16:46:09 2015 +0100 +++ b/libraries/mondelefant/mondelefant_native.autodoc.lua Fri Mar 20 16:58:31 2015 +0100 @@ -243,7 +243,7 @@ name -- reference name ) -This function performs a lookup for the given name in the "reference" table. Prototypes are used, when lookup was unsuccessful. +This function performs a lookup for the given name in the "reference" table. Prototypes are used when lookup was unsuccessful. --]]-- -- implemented in mondelefant_native.c as @@ -257,7 +257,7 @@ foreign_key -- foreign key ) -This function performs a lookup for the given name in the "foreign_keys" table. Prototypes are used, when lookup was unsuccessful. +This function performs a lookup for the given name in the "foreign_keys" table. Prototypes are used when lookup was unsuccessful. --]]-- -- implemented in mondelefant_native.c as diff -r d6bcb9eadd39 -r a533ab6d7337 libraries/mondelefant/mondelefant_native.c --- a/libraries/mondelefant/mondelefant_native.c Fri Mar 20 16:46:09 2015 +0100 +++ b/libraries/mondelefant/mondelefant_native.c Fri Mar 20 16:58:31 2015 +0100 @@ -1813,6 +1813,11 @@ lua_setfield(L, 1, "class_metatable"); lua_newtable(L); // 2 +#if LUA_VERSION_NUM >= 502 + luaL_setfuncs(L, mondelefant_class_methods, 0); +#else + luaL_register(L, NULL, mondelefant_class_methods); +#endif lua_newtable(L); // 3 #if LUA_VERSION_NUM >= 502 luaL_setfuncs(L, mondelefant_object_methods, 0);