saleyn / eixx

Erlang C++ Interface
Apache License 2.0
137 stars 26 forks source link

portability enhancements, allow 32-bit platform #10

Closed erlanger closed 9 years ago

erlanger commented 9 years ago

This patch allows eixx to work in platforms other than 64-bit platforms.

I also relaxed some of the static_assert's, since it is okay for the data structure to be smaller than the value storage. Nonetheless, I left the strict check for eterm and var, it seemed reasonable to do so since they are the top-level types.

The use of the void* as a value storage in the union (for copy purposes) was limiting eixx to 64-bit platforms. I changed the value storage to a uint64_t and have tested on 32bit and 64bit machines. All tests pass with flying colors! Thanks for the good work you've done with this library.