# ErlInterface Release Notes

## Erl_interface 3.4

### Fixed errors and malfunctions

- erl_print_term() and erl_copy_term() couldn't previously handle uints. This bug has now been fixed.
  (Own Id: OTP-4061)
  (Aux Id: seq7079)

- ei_x_format() was not working correctly for floating point arguments on some platforms. This is now corrected.
  (Own Id: OTP-4379)

- erl_compare_ext() didn't compare the node parts of pids, ports, and references. This has now been fixed. Comparison between two `pid`s, `port`s, or `reference`s does now conform to the Erlang specification.
  (Own Id: OTP-4512)
  (Aux Id: OTP-4511)

### Improvements and new features

- Erl_interface and EI now supports 64 bit architectures. (Own Id: OTP-4772)
- There are new functions that support the GCC and Visual C++ 64 bit extended integer types

  int ei_decode_longlong(const char *buf, int *index, EI_LONGLONG *p);
  int ei_decode_ulonglong(const char *buf, int *index, EI_ULONGLONG *p);
  int ei_encode_longlong(char *buf, int *index, EI_LONGLONG p);
  int ei_encode_ulonglong(char *buf, int *index, EI_ULONGLONG p);
  int ei_x_encode_longlong(ei_x_buff* x, EI_LONGLONG n);
  int ei_x_encode_ulonglong(ei_x_buff* x, EI_ULONGLONG n); (Own Id: OTP-4772)

- If you compile the library from source you can use the ei library together with GMP, the GNU multi precision library, to convert integers larger than 64 bits from and to the external format.

  int ei_decode_bignum(const char *buf, int *index, mpz_t obj);
  int ei_encode_bignum(char *buf, int *index, mpz_t obj);
  int ei_x_encode_bignum(ei_x_buff *x, mpz_t obj); (Own Id: OTP-4772)

- Some general code improvements where done like correcting buffer sizes, added more error checking etc.
  (Own Id: OTP-4772)
- In order to conform to the Erlang specification, comparison between two pids was changed in the R9B release. This change did however break a deadlock- prevention algorithm used by mnesia during release upgrade. Therefore, comparison between two pids has been changed back so that R9B nodes are compatible with Erlang nodes running pre-R9 releases.
  Pre-R9 comparison between two pids which now is used again: If t1 and t2 are both pids, t1 will precede t2 if and only if either * the node local id of t1 precedes the node local id of t2, or * the node local ids of t1 and t2 are equal, and node(t1) precedes node(t2), or * the node local ids of t1 and t2 are equal, and also node(t1) and node(t2) are equal, and node(t1) was created before node(t2).
  The node local id consist of two integers; serial which is most significant, and number.
  The Erlang specification states: If t1 and t2 are both refs, both PIDs, or both ports, then t1 precedes t2 if and only if either * node(t1) precedes node(t2), or * node(t1) equals node(t2) and t1 was created before t2.
  Note that comparisons between two refs, or two ports will still conform to the Erlang specification.
  (*** POTENTIAL INCOMPATIBILITY ***)
  (Own Id: OTP-4715)
  (Aux Id: OTP-4511, OTP-4512)

## ErlInterface 3.3

### Improvements and new features

- ErlInterface has been rewritten extensively. The library `ei` is now documented and supported. The old `erl_interface` is considered obsolete, and provided only for backward compatibility.
- ErlInterface is now thread-safe, and multiple C-nodes may run from the same process.
- New functions are added for connecting and accepting connections from `ei`; these are documented in `ei_connect` .
- New functions are added for converting to and from erlang binary format; these are documented in `ei`.

There are also release notes for older versions.