diff options
author | Aki <please@ignore.pl> | 2021-02-24 21:22:12 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2021-02-24 21:22:12 +0100 |
commit | d64871855128af6fa41a8c089686552ca1b66c70 (patch) | |
tree | 949ee94a4d83eec97ffec681c36ddb13f5b6a3bc /response.c | |
parent | 0cbe8c24b3f870d91084b3612dba8b4478b64a32 (diff) | |
download | plop-d64871855128af6fa41a8c089686552ca1b66c70.zip plop-d64871855128af6fa41a8c089686552ca1b66c70.tar.gz plop-d64871855128af6fa41a8c089686552ca1b66c70.tar.bz2 |
Replaced pushstring with pushliteral where applicable
Diffstat (limited to 'response.c')
-rw-r--r-- | response.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -32,7 +32,7 @@ int response_send(lua_State * L, const int fd) char * buffer = malloc(bytes_total); char * new_buffer = NULL; - lua_pushstring(L, "status"); + lua_pushliteral(L, "status"); lua_gettable(L, -2); const lua_Integer status = lua_tointeger(L, -1); lua_pop(L, 1); @@ -46,7 +46,7 @@ int response_send(lua_State * L, const int fd) bytes_used = snprintf(buffer, bytes_total, "HTTP/1.1 %d\r\n\r\n", (int) status) - 2; - lua_pushstring(L, "headers"); + lua_pushliteral(L, "headers"); lua_gettable(L, -2); if (0 == lua_istable(L, -1)) @@ -106,7 +106,7 @@ int response_send(lua_State * L, const int fd) buffer[bytes_used + 1] = '\n'; bytes_used += 2; - lua_pushstring(L, "data"); + lua_pushliteral(L, "data"); lua_gettable(L, -2); size_t data_length = 0; const char * data = lua_tolstring(L, -1, &data_length); |