MCPcopy Create free account
hub / github.com/Ahmeth4n/renef / lua_register_java

Function lua_register_java

src/agent/lua/api_java.c:987–1014  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

985};
986
987void lua_register_java(lua_State* L) {
988 luaL_newmetatable(L, JAVA_WRAPPER_MT);
989 lua_pushvalue(L, -1);
990 lua_setfield(L, -2, "__index");
991 luaL_setfuncs(L, java_wrapper_methods, 0);
992 lua_pop(L, 1);
993
994 luaL_newmetatable(L, JAVA_INSTANCE_MT);
995 lua_pushcfunction(L, lua_java_instance_index);
996 lua_setfield(L, -2, "__index");
997 luaL_setfuncs(L, java_instance_methods, 0);
998 lua_pop(L, 1);
999
1000 lua_newtable(L);
1001
1002 lua_pushcfunction(L, lua_java_use);
1003 lua_setfield(L, -2, "use");
1004
1005 lua_pushcfunction(L, lua_java_register_class);
1006 lua_setfield(L, -2, "registerClass");
1007
1008 lua_pushcfunction(L, lua_java_array);
1009 lua_setfield(L, -2, "array");
1010
1011 lua_setglobal(L, "Java");
1012
1013 LOGI("Java API registered");
1014}

Callers 1

register_renef_apiFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected