main.c 287 B

123456789101112131415
  1. #include <luashim.h>
  2. int luaopen_socket_core(lua_State *L);
  3. #ifdef _WIN32
  4. __declspec(dllexport) int luaopen_luasocket(lua_State *L)
  5. #else
  6. int luaopen_luasocket(lua_State *L)
  7. #endif
  8. {
  9. shimInitialize(L);
  10. luaL_requiref(L, "socket", luaopen_socket_core, 1);
  11. lua_pop(L, 1);
  12. return 0;
  13. }