driver_output_term() and unsigned long (32 bit) values
Fri Jul 26 12:07:52 CEST 2002
> If I'm reading the source correctly, a driver can't send an unsigned
> 32-bit value back to Erlang. It cannot send an arbitrary bignum,
> either. Is the former (or both) possible to include in R9 at this
> late date?
Correct, there is no interface to create an arbitrary bignum but for
an arbitrary ulong the ei_encode_ulong function does the work for you.
It will encode a small big if the ulong is larger than ERL_MAX.
What kind of interface would you like to see for encoding arbitrary
bignums ? (string -> bignum) ?
> For what it's worth, it doesn't appear possible to have the driver
> create a reference and send that back to Erlang, either.
IMHO, I think it is a bad idea to allow a driver to create a reference
since references should be unique and it will be hard to guarantee
uniqueness if there are several allocators ...
More information about the erlang-questions