Used by newstruct_Assign for overloaded '='
| 180 | |
| 181 | // Used by newstruct_Assign for overloaded '=' |
| 182 | BOOLEAN newstruct_Assign_user(int op, leftv l, leftv r) |
| 183 | { |
| 184 | blackbox *ll=getBlackboxStuff(op); |
| 185 | assume(ll->data != NULL); |
| 186 | newstruct_desc nt=(newstruct_desc)ll->data; |
| 187 | newstruct_proc p=nt->procs; |
| 188 | |
| 189 | while( (p!=NULL) && ((p->t!='=')||(p->args!=1)) ) p=p->next; |
| 190 | |
| 191 | if (p!=NULL) |
| 192 | { |
| 193 | BOOLEAN sl; |
| 194 | idrec hh; |
| 195 | hh.Init(); |
| 196 | hh.id=Tok2Cmdname(p->t); |
| 197 | hh.typ=PROC_CMD; |
| 198 | hh.data.pinf=p->p; |
| 199 | sleftv tmp; |
| 200 | tmp.Copy(r); |
| 201 | sl = iiMake_proc(&hh, NULL, &tmp); |
| 202 | if (!sl) |
| 203 | { |
| 204 | if (iiRETURNEXPR.Typ() == op) |
| 205 | { |
| 206 | memcpy(l,&iiRETURNEXPR,sizeof(sleftv)); |
| 207 | iiRETURNEXPR.Init(); |
| 208 | return FALSE; |
| 209 | } |
| 210 | iiRETURNEXPR.CleanUp(); |
| 211 | iiRETURNEXPR.Init(); |
| 212 | } |
| 213 | } |
| 214 | return TRUE; |
| 215 | } |
| 216 | |
| 217 | void lClean_newstruct(lists l) |
| 218 | { |
no test coverage detected