Skip to content

Instantly share code, notes, and snippets.

@zr-tex8r zr-tex8r/dotest.lua
Created Jul 15, 2019

What would you like to do?
Incompatibility result on use of LuaFFI on LuaTeX, between version 1.10 and 1.07
ffi = require "ffi"
ffitest = ffi.load("ffitest")
void test1(unsigned long);
ffitest.test1(42) -->I got 42.
ffitest.test1(42.0) -->I got 42.
ffitest.test1(42.195) -->I got 0. (LuaTeX 1.10.0 / Lua 5.3)
-->I got 42. (LuaTeX 1.07.0 / Lua 5.2)
#include <stdio.h>
__declspec(dllexport) void test1(unsigned long value) {
printf("I got %lu.\n", value);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.