Skip to content

Commit

Permalink
minimized changes of lua5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
missdeer committed Jan 20, 2024
1 parent c35b021 commit 53c0970
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
./buildlua.sh
cd -
- name: Build on Unix
if: matrix.os != 'macos' && matrix.os != 'windows'
- name: Build GetNovel on Linux
if: matrix.os == 'ubuntu'
run: |
go build -ldflags="-s -w -X main.sha1ver=$(git rev-parse --short HEAD) -X 'main.buildTime=$(date)'" -tags ${{ matrix.lua-version }} -o getnovel .
mkdir ${{ matrix.os }}-amd64
Expand All @@ -41,7 +41,7 @@ jobs:
cp -r handlers ${{ matrix.os }}-amd64/
cp -r lua ${{ matrix.os }}-amd64/
- name: Build on macOS
- name: Build GetNovel on macOS
if: matrix.os == 'macos'
run: |
env CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w -X main.sha1ver=$(git rev-parse --short HEAD) -X 'main.buildTime=$(date)'" -tags ${{ matrix.lua-version }} -o getnovel-amd64 .
Expand Down
5 changes: 5 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ set CGO_ENABLED=1
for /F "tokens=*" %%R in ('git rev-parse --short HEAD') do set REV=%%R
for /F "tokens=*" %%A in ('date /T') do set TODAY=%%A
@echo on
go clean -tags lua51
go build -ldflags="-s -w -X main.sha1ver=%REV% -X 'main.buildTime=%TODAY%'" -tags lua51 -o getnovel-lua51.exe
go clean -tags lua52
go build -ldflags="-s -w -X main.sha1ver=%REV% -X 'main.buildTime=%TODAY%'" -tags lua52 -o getnovel-lua52.exe
go clean -tags lua53
go build -ldflags="-s -w -X main.sha1ver=%REV% -X 'main.buildTime=%TODAY%'" -tags lua53 -o getnovel-lua53.exe
go clean -tags lua54
go build -ldflags="-s -w -X main.sha1ver=%REV% -X 'main.buildTime=%TODAY%'" -tags lua54 -o getnovel-lua54.exe
go clean -tags luajit
go build -ldflags="-s -w -X main.sha1ver=%REV% -X 'main.buildTime=%TODAY%'" -tags luajit -o getnovel-luajit.exe
2 changes: 1 addition & 1 deletion golua/lua/lua54/lua.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ LUA_API int (lua_rawgetp) (lua_State *L, int idx, const void *p);

LUA_API void (lua_createtable) (lua_State *L, int narr, int nrec);
LUA_API void *(lua_newuserdatauv) (lua_State *L, size_t sz, int nuvalue);
LUA_API void *(lua_newuserdata) (lua_State *L, size_t sz);
LUA_API int (lua_getmetatable) (lua_State *L, int objindex);
LUA_API int (lua_getiuservalue) (lua_State *L, int idx, int n);

Expand Down Expand Up @@ -421,6 +420,7 @@ LUA_API void (lua_closeslot) (lua_State *L, int idx);

#endif

LUA_API void *(lua_newuserdata) (lua_State *L, size_t sz);
#define lua_getuservalue(L,idx) lua_getiuservalue(L,idx,1)
#define lua_setuservalue(L,idx) lua_setiuservalue(L,idx,1)

Expand Down

0 comments on commit 53c0970

Please sign in to comment.