bugfix in buffer object. Didn't increase the refcount when slicing
This commit is contained in:
+4
-14
@@ -1,15 +1,11 @@
|
||||
|
||||
fun dummy() {}
|
||||
Func = type(dummy)
|
||||
| type(print);
|
||||
|
||||
Scanner = {
|
||||
src: String,
|
||||
i: int,
|
||||
hint: Func,
|
||||
current: Func,
|
||||
consume: Func,
|
||||
consumeSpaces: Func
|
||||
hint: Callable,
|
||||
current: Callable,
|
||||
consume: Callable,
|
||||
consumeSpaces: Callable
|
||||
};
|
||||
|
||||
fun hint(scan: Scanner, n: int = 1) {
|
||||
@@ -60,9 +56,3 @@ fun isSpace(c: String)
|
||||
return c == ' '
|
||||
or c == '\t'
|
||||
or c == '\n';
|
||||
|
||||
fun min(x, y) {
|
||||
if x < y:
|
||||
return x;
|
||||
return y;
|
||||
}
|
||||
Reference in New Issue
Block a user