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

Support passing string through ffi.string() #10

Closed
vsergeev opened this issue Oct 21, 2020 · 0 comments
Closed

Support passing string through ffi.string() #10

vsergeev opened this issue Oct 21, 2020 · 0 comments

Comments

@vsergeev
Copy link
Contributor

vsergeev commented Oct 21, 2020

local ffi = jit and require('ffi') or require('cffi')

local s = "hello world"
print(ffi.string(s)) --> expected: "hello world", get: bad argument #1 to 'string' (cannot convert 'string' to 'char const *')

LuaJIT FFI allows passing a string argument through ffi.string().

@vsergeev vsergeev changed the title Support fall through of string through ffi.string() Support passing string through ffi.string() Oct 21, 2020
@q66 q66 closed this as completed in 642dd04 Oct 21, 2020
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

No branches or pull requests

1 participant