comparison src/luan/interp/UpValue.java @ 48:64ecb7a3aad7

rename Lua to Luan git-svn-id: https://luan-java.googlecode.com/svn/trunk@49 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Fri, 28 Dec 2012 03:29:12 +0000
parents 0cdc1da466ee
children 8ede219cd111
comparison
equal deleted inserted replaced
47:659c7139e903 48:64ecb7a3aad7
34 isClosed = true; 34 isClosed = true;
35 stack = null; 35 stack = null;
36 } 36 }
37 37
38 static interface Getter { 38 static interface Getter {
39 public UpValue get(LuaStateImpl lua); 39 public UpValue get(LuanStateImpl lua);
40 } 40 }
41 41
42 static final class StackGetter implements Getter { 42 static final class StackGetter implements Getter {
43 private final int index; 43 private final int index;
44 44
45 StackGetter(int index) { 45 StackGetter(int index) {
46 this.index = index; 46 this.index = index;
47 } 47 }
48 48
49 public UpValue get(LuaStateImpl lua) { 49 public UpValue get(LuanStateImpl lua) {
50 return lua.getUpValue(index); 50 return lua.getUpValue(index);
51 } 51 }
52 } 52 }
53 53
54 static final class NestedGetter implements Getter { 54 static final class NestedGetter implements Getter {
56 56
57 NestedGetter(int index) { 57 NestedGetter(int index) {
58 this.index = index; 58 this.index = index;
59 } 59 }
60 60
61 public UpValue get(LuaStateImpl lua) { 61 public UpValue get(LuanStateImpl lua) {
62 return lua.closure().upValues[index]; 62 return lua.closure().upValues[index];
63 } 63 }
64 } 64 }
65 65
66 static final Getter globalGetter = new Getter() { 66 static final Getter globalGetter = new Getter() {
67 public UpValue get(LuaStateImpl lua) { 67 public UpValue get(LuanStateImpl lua) {
68 return new UpValue(lua.global()); 68 return new UpValue(lua.global());
69 } 69 }
70 }; 70 };
71 71
72 } 72 }