a sandboxed Lua backend for FastCGI
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

31 lines
775 B

  1. #define LF_ERRNONE 0
  2. #define LF_ERRANY 1
  3. #define LF_ERRACCESS 2
  4. #define LF_ERRMEMORY 3
  5. #define LF_ERRNOTFOUND 4
  6. #define LF_ERRSYNTAX 5
  7. #define LF_ERRBYTECODE 6
  8. #define LF_ERRNOPATH 7
  9. #define LF_ERRNONAME 8
  10. typedef struct {
  11. FCGX_Stream *response;
  12. int committed;
  13. } LF_state;
  14. typedef struct {
  15. size_t memory;
  16. struct timeval cpu;
  17. size_t output;
  18. } LF_limits;
  19. lua_State *LF_newstate(int, char *);
  20. LF_limits *LF_newlimits();
  21. void LF_setlimits(LF_limits *, size_t, size_t, uint32_t, uint32_t);
  22. void LF_enablelimits(lua_State *, LF_limits *);
  23. void LF_parserequest(lua_State *l, FCGX_Request *, LF_state *);
  24. void LF_emptystack(lua_State *);
  25. int LF_fileload(lua_State *, const char *, char *);
  26. int LF_loadscript(lua_State *);
  27. void LF_closestate(lua_State *);