Lines Matching refs:L

5 int mcplib_response_elapsed(lua_State *L) {  in mcplib_response_elapsed()  argument
6 mcp_resp_t *r = luaL_checkudata(L, -1, "mcp.response"); in mcplib_response_elapsed()
7 lua_pushinteger(L, r->elapsed); in mcplib_response_elapsed()
12 int mcplib_response_ok(lua_State *L) { in mcplib_response_ok() argument
13 mcp_resp_t *r = luaL_checkudata(L, -1, "mcp.response"); in mcplib_response_ok()
16 lua_pushboolean(L, 1); in mcplib_response_ok()
18 lua_pushboolean(L, 0); in mcplib_response_ok()
24 int mcplib_response_hit(lua_State *L) { in mcplib_response_hit() argument
25 mcp_resp_t *r = luaL_checkudata(L, -1, "mcp.response"); in mcplib_response_hit()
28 lua_pushboolean(L, 1); in mcplib_response_hit()
30 lua_pushboolean(L, 0); in mcplib_response_hit()
39 int mcplib_response_vlen(lua_State *L) { in mcplib_response_vlen() argument
40 mcp_resp_t *r = luaL_checkudata(L, -1, "mcp.response"); in mcplib_response_vlen()
45 lua_pushinteger(L, r->resp.vlen-2); in mcplib_response_vlen()
47 lua_pushinteger(L, 0); in mcplib_response_vlen()
54 int mcplib_response_code(lua_State *L) { in mcplib_response_code() argument
55 mcp_resp_t *r = luaL_checkudata(L, -1, "mcp.response"); in mcplib_response_code()
57 lua_pushinteger(L, r->resp.code); in mcplib_response_code()
63 int mcplib_response_line(lua_State *L) { in mcplib_response_line() argument
64 mcp_resp_t *r = luaL_checkudata(L, -1, "mcp.response"); in mcplib_response_line()
67 lua_pushlstring(L, r->resp.rline, r->resp.rlen); in mcplib_response_line()
69 lua_pushnil(L); in mcplib_response_line()
75 int mcplib_response_flag_blank(lua_State *L) { in mcplib_response_flag_blank() argument
76 mcp_resp_t *r = luaL_checkudata(L, 1, "mcp.response"); in mcplib_response_flag_blank()
79 const char *flagstr = luaL_checklstring(L, 2, &len); in mcplib_response_flag_blank()
82 proxy_lua_error(L, "request: meta flag must be a single character"); in mcplib_response_flag_blank()
86 proxy_lua_error(L, "request: invalid flag, must be A-Z,a-z"); in mcplib_response_flag_blank()
109 lua_pushboolean(L, 1); // found and blanked. in mcplib_response_flag_blank()
118 lua_pushboolean(L, 0); // not found or not done. in mcplib_response_flag_blank()
148 int mcplib_response_gc(lua_State *L) { in mcplib_response_gc() argument
149 LIBEVENT_THREAD *t = PROXY_GET_THR(L); in mcplib_response_gc()
150 mcp_resp_t *r = luaL_checkudata(L, -1, "mcp.response"); in mcplib_response_gc()
159 int mcplib_response_close(lua_State *L) { in mcplib_response_close() argument
160 LIBEVENT_THREAD *t = PROXY_GET_THR(L); in mcplib_response_close()
161 mcp_resp_t *r = luaL_checkudata(L, 1, "mcp.response"); in mcplib_response_close()