Created
July 21, 2019 11:40
-
-
Save daurnimator/2db147d7f925ad1345d59aeb0e00341f 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
EVIL |
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
const builtin = @import("builtin"); | |
const foo = @cImport({ | |
@cDefine("EVIL", "char foo(void) {return 42;}"); | |
@cInclude("/home/daurnimator/src/zig-playground/evil.h"); | |
}).foo; | |
pub fn main() u8 { | |
return foo(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment