Skip to content

c/lua:custom alloc - #796

Merged
xushiwei merged 5 commits into
xgo-dev:mainfrom
luoliwoshang:c/lua/fn
Sep 18, 2024
Merged

c/lua:custom alloc#796
xushiwei merged 5 commits into
xgo-dev:mainfrom
luoliwoshang:c/lua/fn

Conversation

@luoliwoshang

Copy link
Copy Markdown
Contributor

No description provided.

@codecov

codecov Bot commented Sep 16, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.54%. Comparing base (9f8b9ea) to head (d4273d8).
Report is 11 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #796   +/-   ##
=======================================
  Coverage   97.53%   97.54%           
=======================================
  Files          19       19           
  Lines        4668     4683   +15     
=======================================
+ Hits         4553     4568   +15     
  Misses         97       97           
  Partials       18       18           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment thread c/lua/lauxlib.go Outdated
//go:linkname Newstate C.luaL_newstate
func Newstate() *State
//go:linkname Newstate__1 C.luaL_newstate
func Newstate__1() *State { return nil }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为啥要修改这个函数名?
另外,go:linkname 是不需要函数 body 的

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mmexport1726534063755.png

mmexport1726534059916.png

多个头文件中,会出现去掉对应前缀后,函数名一样的情况(这里即luaL_newState和lua_newState,luaL和lua都视为需要移除的前缀),在后续自动生成工具看来这种函数即视为重载函数,所以这里将对应的两个函数改成newstate__0,newstate__1

@xushiwei
xushiwei merged commit 4bf5dd1 into xgo-dev:main Sep 18, 2024
@luoliwoshang
luoliwoshang deleted the c/lua/fn branch September 23, 2024 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants