Use optional CFFI in the Lime tools

This commit is contained in:
Joshua Granick
2015-08-28 11:00:13 -07:00
parent 5ff7c5382d
commit 89fe74a08c
2 changed files with 41 additions and 24 deletions

View File

@@ -255,7 +255,11 @@ class System {
#end #end
#if optional_cffi #if optional_cffi
if (library != "lime" || method != "neko_init") {
lazy = true; lazy = true;
}
#end #end
if (disableCFFI) { if (disableCFFI) {
@@ -478,7 +482,9 @@ class System {
if (!__loadedNekoAPI) { if (!__loadedNekoAPI) {
var init = load ("lime", "neko_init", 5, lazy); try {
var init = load ("lime", "neko_init", 5);
if (init != null) { if (init != null) {
@@ -506,6 +512,16 @@ class System {
} }
#end #end
} catch (e:Dynamic) {
if (!lazy) {
throw ("Could not find NekoAPI interface.");
}
}
__loadedNekoAPI = true; __loadedNekoAPI = true;
} }

View File

@@ -4,3 +4,4 @@
-lib lime -lib lime
-lib format -lib format
#-lib svg #-lib svg
-D optional_cffi