Example #1
0
void
ts_lua_inject_remap_api(lua_State *L)
{
  ts_lua_inject_remap_variables(L);

  lua_newtable(L);

  lua_pushcfunction(L, ts_lua_remap_get_from_url_host);
  lua_setfield(L, -2, "get_from_url_host");

  lua_pushcfunction(L, ts_lua_remap_get_from_url_port);
  lua_setfield(L, -2, "get_from_url_port");

  lua_pushcfunction(L, ts_lua_remap_get_from_url_scheme);
  lua_setfield(L, -2, "get_from_url_scheme");

  lua_pushcfunction(L, ts_lua_remap_get_from_uri);
  lua_setfield(L, -2, "get_from_uri");

  lua_pushcfunction(L, ts_lua_remap_get_from_url);
  lua_setfield(L, -2, "get_from_url");

  lua_pushcfunction(L, ts_lua_remap_get_to_url_host);
  lua_setfield(L, -2, "get_to_url_host");

  lua_pushcfunction(L, ts_lua_remap_get_to_url_port);
  lua_setfield(L, -2, "get_to_url_port");

  lua_pushcfunction(L, ts_lua_remap_get_to_url_scheme);
  lua_setfield(L, -2, "get_to_url_scheme");

  lua_pushcfunction(L, ts_lua_remap_get_to_uri);
  lua_setfield(L, -2, "get_to_uri");

  lua_pushcfunction(L, ts_lua_remap_get_to_url);
  lua_setfield(L, -2, "get_to_url");

  lua_setfield(L, -2, "remap");
}
Example #2
0
void
ts_lua_inject_remap_api(lua_State *L)
{
    ts_lua_inject_remap_variables(L);
}