cpml: use hash table to get the primitive class
commita30d6ce244f811614ec3adc8d19526128eb25fe8
authorNicola Fontana <ntd@entidi.it>
Sat, 28 Feb 2015 16:18:22 +0000 (28 17:18 +0100)
committerNicola Fontana <ntd@entidi.it>
Sat, 28 Feb 2015 16:18:22 +0000 (28 17:18 +0100)
tree7b23693b5aee886f062ca0531fb099af1a02bb3f
parent91ab515072f674d8b2656ace1b239da054f4b922
cpml: use hash table to get the primitive class

Instead of a serie of if/else, use an hash table to get the class (a
struct filled with function pointers) from the primitive type (an
integer number).

Lowered the CPML_ARC value to keep that table small.
src/cpml/cpml-primitive.c
src/cpml/cpml-primitive.h