gm2
[Top][All Lists]
Advanced

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

[Gm2] translating C bit fields


From: SiTex Graphics
Subject: [Gm2] translating C bit fields
Date: Wed, 16 Nov 2011 18:40:26 -0500

I'm looking for advice on how to translate bit fields in a C struct
for reference in MODULA-2 (compiling with gm2).

E.g.,

struct _GtkToggleButton
{
  GtkButton button;

  guint active : 1;
  guint draw_indicator : 1;
  guint inconsistent : 1;
};

My first thought is to turn the bit fields into a set, but I'm
wondering whether that will reliably match up with the way bits are
packed by gcc.

Thanks,
Scott



reply via email to

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