Rev 1913 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1913 | Rev 2001 | ||
---|---|---|---|
Line 67... | Line 67... | ||
67 | } |
67 | } |
Line 68... | Line 68... | ||
68 | 68 | ||
69 | tp_obj tp_get(TP,tp_obj self, tp_obj k) { |
69 | tp_obj tp_get(TP,tp_obj self, tp_obj k) { |
70 | int type = self.type; |
70 | int type = self.type; |
71 | tp_obj r; |
- | |
- | 71 | tp_obj r; |
|
72 | /*con_printf("tp_get %s %s\n", TP_CSTR(self), TP_CSTR(k));*/ |
72 | |
73 | if (type == TP_DICT) { |
73 | if (type == TP_DICT) { |
74 | return _tp_dict_get(tp,self.dict.val,k,"tp_get"); |
74 | return _tp_dict_get(tp,self.dict.val,k,"tp_get"); |
75 | } else if (type == TP_LIST) { |
75 | } else if (type == TP_LIST) { |
76 | if (k.type == TP_NUMBER) { |
76 | if (k.type == TP_NUMBER) { |
Line 140... | Line 140... | ||
140 | memcpy(ptr,self.string.val+a,b-a); ptr[b-a]=0; |
140 | memcpy(ptr,self.string.val+a,b-a); ptr[b-a]=0; |
141 | return tp_track(tp,r); |
141 | return tp_track(tp,r); |
142 | } |
142 | } |
143 | } |
143 | } |
Line 144... | Line -... | ||
144 | - | ||
145 | - | ||
146 | con_printf("Raising exception\n"); |
144 | |
147 | tp_raise(tp_None,"tp_get(%s,%s)",TP_CSTR(self),TP_CSTR(k)); |
145 | tp_raise(tp_None,"tp_get(%s,%s)",TP_CSTR(self),TP_CSTR(k)); |
Line 148... | Line 146... | ||
148 | } |
146 | } |
149 | 147 | ||
Line 160... | Line 158... | ||
160 | return 1; |
158 | return 1; |
161 | } |
159 | } |
Line 162... | Line 160... | ||
162 | 160 | ||
163 | void tp_set(TP,tp_obj self, tp_obj k, tp_obj v) { |
161 | void tp_set(TP,tp_obj self, tp_obj k, tp_obj v) { |
164 | int type; |
- | |
- | 162 | int type; |
|
165 | con_printf("vm is %x self is %x k is %x v is %x", tp, self, k, v); |
163 | |
166 | type = self.type; |
164 | type = self.type; |
167 | if (type == TP_DICT) { |
165 | if (type == TP_DICT) { |
168 | _tp_dict_set(tp,self.dict.val,k,v); |
166 | _tp_dict_set(tp,self.dict.val,k,v); |
169 | return; |
167 | return; |