Last active
October 4, 2018 19:23
-
-
Save jdonaldson/bb21bfea7befa05b2c17db34cfe693be to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-main Main | |
-lua out.lua | |
-D lua-jit | |
-cmd lua out.lua |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import lua.jit.FFIBuilder; | |
import lua.Ffi; | |
class Main { | |
static function main() { | |
var k= 'hi'; | |
trace(k.length + " is the value for k.length"); | |
SomeFfi.printf("foo %s", "hi"); | |
SomeFfi.puts("fabaoijaowief\n"); | |
} | |
} | |
extern class SomeFfi implements FfiBuilder { | |
static function printf(fmt : String, arg : String) : Int; | |
static function puts(str : String) : Int; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment