getting rid of utf8string2

Jelmer Vernooij jelmer at samba.org
Tue Mar 30 20:00:16 MDT 2010


On Wed, Mar 24, 2010 at 08:24:34AM +0100, Stefan (metze) Metzmacher wrote:
> > diff --git a/librpc/idl/idl_types.h b/librpc/idl/idl_types.h
> > index e8b3da5..d763a8b 100644
> > --- a/librpc/idl/idl_types.h
> > +++ b/librpc/idl/idl_types.h
> > @@ -48,9 +48,10 @@
> >  #define utf8string	[flag(STR_UTF8|STR_NULLTERM)] string
> >  
> >  /*
> > -  an utf8 string prefixed with [size], 32 bits
> > +  an utf8 string prefixed with [length], 32 bits
> 
> This should be [size] when you use STR_SIZE4...
> 
> > +  not null terminated
> >  */
> > -#define utf8string2	[flag(STR_UTF8|STR_SIZE4)] string
> > +#define utf8string2	[flag(STR_SIZE4|STR_UTF8|STR_NOTERM)] string
> I'd like to get rid of this as you can express the same with valid NDR.
> 
> Something like:
> 
> [value(strlen(dns_name))] uint32 dns_name_size;
> [charset(UTF8)] uint8 dns_name[dns_name_size];
> 
> should do the same.
I prefer this as well, it means we need less special-casing inside of pidl.
Neither is strictly valid in NDR (the inlined array is a pidl/s4 extension).

Cheers,

Jelmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20100331/5a072292/attachment.pgp>


More information about the samba-technical mailing list