Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove @cImport in favor of translateC #96

Merged
merged 2 commits into from
Oct 4, 2024

Conversation

luchak
Copy link
Contributor

@luchak luchak commented Sep 22, 2024

Sounds like @cImport is going away: ziglang/zig#20630 . Changes to type info enum names are still preventing builds on current master from working, but not sure how to fix that without breaking 0.13, so I'll just keep the compatible changes here.

Tests pass for Luau and Lua 5.x, at least on my machine.

LuaJIT is failing, but it was failing in the same way before this change (just change out the import name and the line number):

src/lib.zig:1650:38: error: root struct of file 'luajit_all' has no member named 'lua_rawlen'
            else => return @intCast(c.lua_rawlen(@ptrCast(lua), index)),
                                    ~^~~~~~~~~~~

I tried very briefly to fix this by moving .luajit into the prong above the else, but that exposed a different crash, so I gave up.

@natecraddock
Copy link
Owner

luajit is still a wip target, so no worries if things are failing there.

@natecraddock
Copy link
Owner

I may end up renaming or moving some of these files eventually, but this is a really good start. Thank you for taking the initiative to remove the need for @cImport() before it is actually removed!

@natecraddock natecraddock merged commit f83c1db into natecraddock:main Oct 4, 2024
3 checks passed
@VisenDev VisenDev mentioned this pull request Oct 5, 2024
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