On Fri, Jun 5, 2009 at 11:14 AM, Sam Roberts <vieuxt...@gmail.com> wrote: > 2009/6/5 Stig Bjørlykke <s...@bjorlykke.org>: >> On Fri, Jun 5, 2009 at 1:23 PM, Anders Broman >> <anders.bro...@ericsson.com> wrote: >>> Couldn't: tvb_get_bits8(), tvb_get_bits16(), tvb_get_bits32(), >>> tvb_get_bits64() >>> Be used instead?
Add this for up to 64 bit support, for completion: + } else if (len <= 64) { + UInt64 num = g_malloc(sizeof(guint64)); + *num = tvb_get_bits64(tvbr->tvb->ws_tvb,tvbr->offset*8 + pos, len, FALSE); + pushUInt64(L,num); + return 1; Btw, I don't understand why the UInt64 userdata encapsulates a pointer to a UInt64 instead of the uint itself. It makes it a bit harder to use (you need the g_malloc()). Also, the UInt64s are leaking memory. I guess the idea is a uint64 userdata can have a reference to memory it doesn't own, which is why it doesn't define __gc to g_free() the memory? Sam ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev@wireshark.org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe