What does 'unsigned temp:3' means
Posted
by Munir Ahmed
on Stack Overflow
See other posts from Stack Overflow
or by Munir Ahmed
Published on 2010-06-01T13:16:29Z
Indexed on
2010/06/01
13:23 UTC
Read the original article
Hit count: 302
Hi,
I'm trying to map a C structure to Java using JNA. I came across something that I've never seen.
The struct definition is as follow,
struct op
{
unsigned op_type:9; //---> what does this means?
unsigned op_opt:1;
unsigned op_latefree:1;
unsigned op_latefreed:1;
unsigned op_attached:1;
unsigned op_spare:3;
U8 op_flags;
U8 op_private;
};
you can see some variable being defined like unsigned op_attached:1 and I'm unsure what would that mean: would that effect number of bytes to be allocated for this particular variable?
any help?
Thanks,
Munir
© Stack Overflow or respective owner