|
@@ -5,14 +5,12 @@ import python.HaxeIterable;
|
|
|
import python.NativeIterator;
|
|
|
|
|
|
abstract NativeIterable <T>(NativeIterableRaw<T>) to NativeIterableRaw<T> from NativeIterableRaw<T> {
|
|
|
- @:to public static inline function toHaxeIterable <T>(p:NativeIterableRaw<T>):HaxeIterable<T> return new HaxeIterable(p);
|
|
|
+ @:to public inline function toHaxeIterable():HaxeIterable<T> return new HaxeIterable(this);
|
|
|
|
|
|
- //@:from public static inline function fromArray <T>(p:Array<T>):PyIterable<T> return cast p;
|
|
|
+ public inline function iterator():HaxeIterator<T> return toHaxeIterable().iterator();
|
|
|
|
|
|
- public inline function iterator <T>():HaxeIterator<T> return toHaxeIterable().iterator();
|
|
|
-
|
|
|
- public function getNativeIterable <T>():NativeIterableRaw<T> return this;
|
|
|
- public function getNativeIterator <T>():NativeIteratorRaw<T> return this.__iter__();
|
|
|
+ public inline function getNativeIterable():NativeIterableRaw<T> return this;
|
|
|
+ public inline function getNativeIterator():NativeIteratorRaw<T> return this.__iter__();
|
|
|
|
|
|
}
|
|
|
typedef NativeIterableRaw<T> = {
|