Re: [J-T-C] struct defs

2001-07-05 Thread Andy Armstrong
> OK, you two, Andy/JF convinced me to OOing also in standard C ;;;))) Tres bon ;-) -- Andy Armstrong, Tagish

RE: [J-T-C] struct defs

2001-07-05 Thread GOMEZ Henri
>> >The reason would be to keep the implementation details of >the structure >> >private so that people aren't tempted to access the fields >> >directly. All >> >the caller gets is an opaque handle. Think of it as >'objects lite' for >> >C. >> >> I could understand the OO construction if we wer

Re: [J-T-C] struct defs

2001-07-05 Thread jean-frederic clere
GOMEZ Henri wrote: > > >The reason would be to keep the implementation details of the structure > >private so that people aren't tempted to access the fields > >directly. All > >the caller gets is an opaque handle. Think of it as 'objects lite' for > >C. > > I could understand the OO constructio

Re: [J-T-C] struct defs

2001-07-05 Thread jean-frederic clere
Andy Armstrong wrote: > > GOMEZ Henri wrote: > > > > >The reason would be to keep the implementation details of the structure > > >private so that people aren't tempted to access the fields > > >directly. All > > >the caller gets is an opaque handle. Think of it as 'objects lite' for > > >C. > >

Re: [J-T-C] struct defs

2001-07-05 Thread Andy Armstrong
GOMEZ Henri wrote: > > >The reason would be to keep the implementation details of the structure > >private so that people aren't tempted to access the fields > >directly. All > >the caller gets is an opaque handle. Think of it as 'objects lite' for > >C. > > I could understand the OO constructio

RE: [J-T-C] struct defs

2001-07-05 Thread GOMEZ Henri
>The reason would be to keep the implementation details of the structure >private so that people aren't tempted to access the fields >directly. All >the caller gets is an opaque handle. Think of it as 'objects lite' for >C. I could understand the OO construction if we were using C++ but in stric

Re: [J-T-C] struct defs

2001-07-05 Thread Andy Armstrong
The reason would be to keep the implementation details of the structure private so that people aren't tempted to access the fields directly. All the caller gets is an opaque handle. Think of it as 'objects lite' for C. GOMEZ Henri wrote: > > We found many definitions like this > in mod_jk : > >

[J-T-C] struct defs

2001-07-05 Thread GOMEZ Henri
We found many definitions like this in mod_jk : xxx.h struct jk_map; typedef struct jk_map jk_map_t; xxx.c struct jk_map { jk_pool_t p; jk_pool_atom_t buf[SMALL_POOL_SIZE]; char **names; void **values; unsigned capacity; unsigned size; }; Why not having it directly