GETELEMENTTYPE(tmp)= ELEMFUNCRETURN;
tmp->function=function;
tmp->overflowstatus = overflowstatus;
- tmp->Elements = allocVectorArrayElement(numArrays, array);
+ tmp->inputs=ourmalloc(sizeof(Element *)*numArrays);
+ tmp->numInputs=numArrays;
+ memcpy(tmp->inputs, array, numArrays*sizeof(Element *));
allocInlineDefVectorASTNode(GETELEMENTPARENTS(tmp));
for(uint i=0;i<numArrays;i++)
pushVectorASTNode(GETELEMENTPARENTS(array[i]), (ASTNode *) tmp);
}
void deleteElement(Element *This) {
+ switch(GETELEMENTTYPE(This)) {
+ case ELEMFUNCRETURN:
+ ourfree(((ElementFunction *)This)->inputs);
+ break;
+ default:
+ ;
+ }
deleteVectorArrayASTNode(GETELEMENTPARENTS(This));
ourfree(This);
}