Changeset 6cefd4e in git
- Timestamp:
- Sep 14, 2005, 6:34:52 PM (19 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- a372281e1116c4ec7fe80194d365fade7ed3a455
- Parents:
- 253eb7fd1cc7dfdb930184ad49447a6aa5500252
- Location:
- modules/python
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/python/interpreter.py
r253eb7 r6cefd4e 57 57 58 58 def mycbm(name,*args): 59 l=i_arg_list() 60 for a in args: 61 if isinstance(a,list): 62 at=i_arg_list() 63 for a2 in a: 64 at.append(a2) 65 l.append(at) 66 else: 67 l.append(a) 59 l=list2arg_list(args) 68 60 return cbm(name,l) -
modules/python/interpreter_support.cc
r253eb7 r6cefd4e 177 177 178 178 } 179 void appendPrelist(arg_list& l){180 int n=l .length();181 leftv v=initArg();179 lists dumpToLists(){ 180 int n=length(); 181 182 182 lists res=(lists)omAlloc0Bin(slists_bin); 183 183 res->Init(n); 184 184 for(int i=0;i<n;i++){ 185 leftv iv= l.pop_front();185 leftv iv=pop_front(); 186 186 //swap the content 187 187 memcpy(&res->m[i],iv,sizeof(sleftv)); … … 189 189 omFreeBin(iv, sleftv_bin); 190 190 } 191 v->data=res; 191 return res; 192 193 } 194 void appendPrelist(arg_list& l){ 195 leftv v=initArg(); 196 v->data=l.dumpToLists(); 197 192 198 v->rtyp=LIST_CMD; 193 199 internal_append(v);
Note: See TracChangeset
for help on using the changeset viewer.