Add initial Lime hybrid support (Lime 2 + Lime legacy)
This commit is contained in:
@@ -410,6 +410,21 @@ class System {
|
||||
|
||||
}
|
||||
|
||||
#if hybrid
|
||||
var init = load ("lime-legacy", "neko_init", 5);
|
||||
|
||||
if (init != null) {
|
||||
|
||||
loaderTrace ("Found nekoapi @ " + __moduleNames.get ("lime-legacy"));
|
||||
init (function(s) return new String (s), function (len:Int) { var r = []; if (len > 0) r[len - 1] = null; return r; }, null, true, false);
|
||||
|
||||
} else {
|
||||
|
||||
throw ("Could not find NekoAPI interface.");
|
||||
|
||||
}
|
||||
#end
|
||||
|
||||
__loadedNekoAPI = true;
|
||||
|
||||
}
|
||||
|
||||
@@ -109,6 +109,11 @@ class ByteArray #if !js extends Bytes implements ArrayAccess<Int> implements IDa
|
||||
var init = System.load ("lime", "lime_byte_array_init", 4);
|
||||
init (factory, slen, resize, bytes);
|
||||
|
||||
#if hybrid
|
||||
var init = System.load ("lime-legacy", "lime_byte_array_init", 4);
|
||||
init (factory, slen, resize, bytes);
|
||||
#end
|
||||
|
||||
}
|
||||
#end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user