[Asterisk-Dev] ast_flags question

Holger Schurig hs4233 at mail.mn-solutions.de
Sat Jan 8 01:34:23 MST 2005


> I've been looking at bug 3083
> (http://bugs.digium.com/bug_view_page.php?bug_id=0003083), and am
> wondering if there has been discussion on whether an int is big enough

I'm wondering why nobody uses the c-compiler feature of bitmask handling.


struct bitstruct {
        int b : 1;
};

struct bitstruct b;



...
  b.b = 1;



That saves bytes and is very clear. It can be used whenever we transfer 
the struct over the wire, because the memory layout is not defined from 
compiler to compiler. But for program internal structs, this can be used 
quite nicely.



More information about the asterisk-dev mailing list