Fix size of allocation when creating a pattern

Each pattern object currently contains two AttrValues rather than just one.
This commit is contained in:
chrisdubois 2015-10-07 10:32:55 -07:00
parent e4ba8a4b5a
commit cc47b8ad6a

View File

@ -41,7 +41,7 @@ cdef Pattern* init_pattern(Pool mem, object token_specs, attr_t entity_type) exc
pattern[i].spec[j].attr = attr
pattern[i].spec[j].value = value
i = len(token_specs)
pattern[i].spec = <AttrValue*>mem.alloc(1, sizeof(AttrValue))
pattern[i].spec = <AttrValue*>mem.alloc(2, sizeof(AttrValue))
pattern[i].spec[0].attr = ENT_TYPE
pattern[i].spec[0].value = entity_type
pattern[i].spec[1].attr = LENGTH