[lazarus] bit fields

Peter Vreman pfvreman at wins.uva.nl
Thu May 20 05:42:03 EDT 1999


At 18:55 19-5-99 , you wrote:
> >I've checked how C does the bitfields. But C (and also used in gtk) are
> >things like:
> >
> >guint border_width : 3
> >
> >Thus 3 bits! Which isn't a boolean, but a integer.
> >>
> >I was thinking of building support for it in the compiler, but only in the
> >load/store(=assignment) nodes. So it doesn't work with inc(bitfield)
>
>that would be really good.
>
>btw, Peter, I've checked bindings for others languajes and what they
>do, is not translate the records (structs) of the objects, then
>transforming the object in a opaque object (wich is good), so then
>they provide accesors for the fields.
>Something like this can be done ?
>
>because I think we have a problem with certain functions, for example
>in notebook we have:
>
>function  show_border()    // pretty generic name
>wich does the work of gtk_notebook_get_show_border() // wich don't exist
>
>then it should be:
>function  gtk_notebook_show_border()
>or better:
>function  gtk_notebook_get_show_border()
>
>or something like that, no ?
The generic name doesn't matter because with the overloading there is no 
problem, and show_border is the field name in the record. To use 
gtk_notebook_ prefix will confuses with gtk procedures.







More information about the Lazarus mailing list