xlua macos luajit 编译报错
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Domain
- build-system
Research direction
Start with build/sproto/lsproto.c and inspect how lua_tointegerx is declared or used under Lua 5.1 and LuaJIT. Reproduce the macOS compilation error and compare it with the other platform builds; done means the relevant configurations compile without the implicit-declaration or conflicting-definition errors.
Written by the indexing model from the issue text.
Description
一开始其他平台编译luajit报错lua_tointegerx 的static定义有问题,注释掉这段之后继续
#if LUA_VERSION_NUM < 502
/* static int64_t lua_tointegerx(lua_State *L, int idx, int *isnum) {
if (lua_isnumber(L, idx)) {
if (isnum) *isnum = 1;
return (int64_t)lua_tointeger(L, idx);
}
else {
if (isnum) *isnum = 0;
return 0;
}
} */
到后面又有报错,提示lua_tointegerx定义不清晰,看了下,macos下编译luajit,用的是lua5.1的代码,就会有问题
/Users/runner/work/xLua/xLua/build/sproto/lsproto.c:295:8: error: implicit declaration of function 'lua_tointegerx' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
想问下这里应该如何兼容各种情况呢?
- Dominant language
- C
- Stars
- 985
- Forks
- 254
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cloudwu/sproto
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
-
proposal:去掉定点数Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
-
有dart版本的吗?Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OpenXiangShan/NEMU#1287 ·
Maintainers usually reply within 1 day
-
area: recompiler area: runtime kind: bug preview-effort: small priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day