pidl facillitates illicit data sharing between idl files
Jelmer Vernooij
jelmer at vernstok.nl
Tue Sep 29 17:16:09 MDT 2009
On Wed, 2009-09-30 at 07:13 +1000, tridge at samba.org wrote:
> > If I add a definition such as this, to my pidl file:
> >
> > typedef struct DATA_BLOB {
> > uint8 *data;
> > uint32 length;
> > } DATA_BLOB;
>
> There are two problems with this:
>
> 1) DATA_BLOB is a base type in pidl. It is not defined in any idl
> file, but instead is a built-in type like uint32 and other base
> types. Trying to re-define it is a bad idea.
>
> 2) the normal form for structure typedefs in pidl is:
>
> typedef struct {
> el1type el1;
> el2type el2;
> } NAME;
>
> Notice that the first line does not contain the structure name.
>
> > For my own benefit I just renamed by struct to avoid the collision, but
> > I believe it is not intentional that one IDL file should cross-infect
> > another in this way - or have I mis-understood?
>
> you've re-defined a base type. All bets are off after that :-)
Perhaps we should have pidl error out if you attempt to redefine a data
type (whether built-in or user-definied in another file).
Cheers,
Jelmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20090929/79d254d1/attachment.pgp>
More information about the samba-technical
mailing list