Skip to content

Commit

Permalink
FFI: Push pointers as lightuserdata instead of integer
Browse files Browse the repository at this point in the history
  • Loading branch information
Sainan committed Feb 10, 2025
1 parent 08da954 commit 6d74877
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lffi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ static int push_ffi_value (lua_State *L, FfiType type, void *value) {
lua_pushnumber(L, *reinterpret_cast<double*>(value));
return 1;
case FFI_PTR:
lua_pushinteger(L, *reinterpret_cast<uintptr_t*>(value));
lua_pushlightuserdata(L, *reinterpret_cast<void**>(value));
return 1;
case FFI_STR:
lua_pushstring(L, *reinterpret_cast<const char**>(value));
Expand Down

0 comments on commit 6d74877

Please sign in to comment.