Fix functionencoder to have correct pointers...
[satune.git] / src / Encoders / functionencoder.c
1 #include "functionencoder.h"
2
3 FunctionEncoder * allocFunctionEncoder(FunctionEncoderType type, Element *function) {
4         FunctionEncoder * this=(FunctionEncoder *)ourmalloc(sizeof(FunctionEncoder));
5         this->op.function=function;
6         this->type=type;
7         return this;
8 }
9
10 FunctionEncoder * allocPredicateEncoder(FunctionEncoderType type, Boolean *predicate) {
11         FunctionEncoder * this=(FunctionEncoder *)ourmalloc(sizeof(FunctionEncoder));
12         this->op.predicate=predicate;
13         this->type=type;
14         return this;
15 }
16
17 void deleteFunctionEncoder(FunctionEncoder *this) {
18         ourfree(this);
19 }