Source/NFX.Erlang/ErlOutputStream.cs
/// <summary>
/// Write a new style (R6 and later) Erlang ref to the stream
/// </summary>
Write a new style (R6 and later) Erlang ref to the stream
Write a new style ( R6 and later ) Erlang ref to the stream
public void WriteRef(ErlRef r)
    {
      Debug.Assert(r != ErlRef.Null);
      Debug.Assert(r.Ids.Length == 3);
      int arity = (int)(r.Ids.Length);
      write(ErlExternalTag.NewRef);
      Write2BE(arity);
      WriteAtom(r.Node);
      Write1(r.Creation & 0x3); 
      Write4BE(r.Ids[0]);
      Write4BE(r.Ids[1]);
      Write4BE(r.Ids[2]);
    }
public void WriteRef ( ErlRef r ) { Debug . Assert ( r != ErlRef . Null ) ; Debug . Assert ( r . Ids . Length == 3 ) ; int arity = ( int ) ( r . Ids . Length ) ; write ( ErlExternalTag . NewRef ) ; Write2BE ( arity ) ; WriteAtom ( r . Node ) ; Write1 ( r . Creation & 0x3 ) ; Write4BE ( r . Ids [ 0 ] ) ; Write4BE ( r . Ids [ 1 ] ) ; Write4BE ( r . Ids [ 2 ] ) ; }
Write a new style (R6 and later) Erlang ref to the stream
Write a new style ( R6 and later ) Erlang ref to the stream
// r6 ref // how many id values // note: creation BEFORE id in r6 ref // 2 bits // first int gets truncated to 18 bits
r
ErlRef