Use union in Boolean to save space
[satune.git] / src / Encoders / elementencoding.c
1 #include "elementencoding.h"
2
3 ElementEncoding * allocElementEncoding(ElementEncodingType type, Element *element) {
4         ElementEncoding * this=(ElementEncoding *)ourmalloc(sizeof(ElementEncoding));
5         this->element=element;
6         this->type=type;
7         this->variables=NULL;
8         this->encodingArray=NULL;
9         this->numVars=0;
10         return this;
11 }
12
13 void deleteElementEncoding(ElementEncoding *this) {
14         if (this->variables!=NULL)
15                 ourfree(this->variables);
16         if (this->encodingArray!=NULL)
17                 ourfree(this->encodingArray);
18         ourfree(this);
19 }