We're assuming ulong and `compact_data*` have equivalent sizes, which isn't always true in a portable world.  Probably want to define macros `CPTR2NUM` and `NUM2CPTR`, picking the appropriate converter similar to how ruby defines [`OFF2NUM` here](https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L248-L256)