Use optional CFFI in the Lime tools
This commit is contained in:
@@ -255,7 +255,11 @@ class System {
|
||||
#end
|
||||
|
||||
#if optional_cffi
|
||||
if (library != "lime" || method != "neko_init") {
|
||||
|
||||
lazy = true;
|
||||
|
||||
}
|
||||
#end
|
||||
|
||||
if (disableCFFI) {
|
||||
@@ -478,7 +482,9 @@ class System {
|
||||
|
||||
if (!__loadedNekoAPI) {
|
||||
|
||||
var init = load ("lime", "neko_init", 5, lazy);
|
||||
try {
|
||||
|
||||
var init = load ("lime", "neko_init", 5);
|
||||
|
||||
if (init != null) {
|
||||
|
||||
@@ -506,6 +512,16 @@ class System {
|
||||
}
|
||||
#end
|
||||
|
||||
} catch (e:Dynamic) {
|
||||
|
||||
if (!lazy) {
|
||||
|
||||
throw ("Could not find NekoAPI interface.");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
__loadedNekoAPI = true;
|
||||
|
||||
}
|
||||
|
||||
@@ -4,3 +4,4 @@
|
||||
-lib lime
|
||||
-lib format
|
||||
#-lib svg
|
||||
-D optional_cffi
|
||||
Reference in New Issue
Block a user