[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-dev] Alignment in AMF data

From: Bastiaan Jacques
Subject: Re: [Gnash-dev] Alignment in AMF data
Date: Sat, 25 Oct 2008 04:54:30 -0700 (PDT)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)

On Fri, 24 Oct 2008, John Gilmore wrote:

   v = (unsigned long) addr[0];
   v |= (unsigned long) addr[1] << 8;
   v |= (unsigned long) addr[2] << 16;
   v |= (unsigned long) addr[3] << 24;

This method has the added benefit of doing the "right thing" for
deserializing integers for which there are no built-in types, e.g.
24-bit integers. Additional tricks would be needed to use the ntohl
method for such integers.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]