On 06/02/2010 02:59 PM, Paolo Bonzini wrote: > On Wed, Jun 2, 2010 at 07:17, Holger Hans Peter Freyther > <[email protected]> wrote: >> Hi All, >> >> for the stuff I am planing to use GNU Smalltalk for I will need to >> create binary structures. This means I need to write numbers and similar >> as uint8,16,32,64, control the endian of these numbers and such. In >> Pharo I have found the DataStream class is there something like this in >> GNU Smalltalk? How would I solve my usecase in GNU Smalltalk? > > For native endianness you can create a CStruct subclass and remember > to instantiate it with #gcNew instead of #new.
Thanks. > The simplest thing to do is of course to use CStruct and do the > endianness conversion yourself. Is there a list of symbols I can use for my CStruct definition, honestly I only looked at the CairoMatrix which is a fairly simple case...? In my case I would like to read and create structure with bitfields like the one below. http://bb.osmocom.org/trac/browser/src/shared/libosmocore/include/osmocore/protocol/gsm_04_08.h thanks holger _______________________________________________ help-smalltalk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-smalltalk
