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

Allow nil for FFI_STR to mean nullptr #980

Merged
merged 1 commit into from
Oct 25, 2024
Merged

Allow nil for FFI_STR to mean nullptr #980

merged 1 commit into from
Oct 25, 2024

Conversation

Sainan
Copy link
Member

@Sainan Sainan commented Oct 25, 2024

Makes this code work:

local ffi = require "pluto:ffi"
local user32 = ffi.open("user32")

local MessageBoxA = user32:wrap("i32", "MessageBoxA", "i32", "str", "str", "i32")
MessageBoxA(0, "Hello from Pluto", nil, 0)

@Sainan Sainan merged commit ead075c into 0.10.0 Oct 25, 2024
8 checks passed
@Sainan Sainan deleted the ffi-str-nilptr branch October 25, 2024 19:39
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.

1 participant