Skip to content

Commit

Permalink
upgrade LuaJIT to 2.1.0-beta3
Browse files Browse the repository at this point in the history
  • Loading branch information
wg committed Jan 21, 2018
1 parent b9a832a commit c080834
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ifneq ($(WITH_LUAJIT),)
CFLAGS += -I$(WITH_LUAJIT)/include
LDFLAGS += -L$(WITH_LUAJIT)/lib
else
CFLAGS += -I$(ODIR)/include/luajit-2.0
CFLAGS += -I$(ODIR)/include/luajit-2.1
DEPS += $(ODIR)/lib/libluajit-5.1.a
endif

Expand Down Expand Up @@ -86,6 +86,7 @@ $(ODIR)/$(OPENSSL): deps/$(OPENSSL).tar.gz | $(ODIR)
$(ODIR)/lib/libluajit-5.1.a: $(ODIR)/$(LUAJIT)
@echo Building LuaJIT...
@$(MAKE) -C $< PREFIX=$(abspath $(ODIR)) BUILDMODE=static install
@cd $(ODIR)/bin && ln -s luajit-2.1.0-beta3 luajit

$(ODIR)/lib/libssl.a: $(ODIR)/$(OPENSSL)
@echo Building OpenSSL...
Expand Down
Binary file removed deps/LuaJIT-2.0.4.tar.gz
Binary file not shown.
Binary file added deps/LuaJIT-2.1.0-beta3.tar.gz
Binary file not shown.
6 changes: 3 additions & 3 deletions src/script.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@ static void set_fields(lua_State *, int, const table_field *);
static void set_field(lua_State *, int, char *, int);
static int push_url_part(lua_State *, char *, struct http_parser_url *, enum http_parser_url_fields);

static const struct luaL_reg addrlib[] = {
static const struct luaL_Reg addrlib[] = {
{ "__tostring", script_addr_tostring },
{ "__gc" , script_addr_gc },
{ NULL, NULL }
};

static const struct luaL_reg statslib[] = {
static const struct luaL_Reg statslib[] = {
{ "__call", script_stats_call },
{ "__index", script_stats_index },
{ "__len", script_stats_len },
{ NULL, NULL }
};

static const struct luaL_reg threadlib[] = {
static const struct luaL_Reg threadlib[] = {
{ "__index", script_thread_index },
{ "__newindex", script_thread_newindex },
{ NULL, NULL }
Expand Down

0 comments on commit c080834

Please sign in to comment.