[PATCH 1/1] PIDL fix for using external types with wireshark backend

Jelmer Vernooij jelmer at samba.org
Tue Oct 6 08:13:01 MDT 2009

On Tue, Oct 06, 2009 at 11:26:57AM +0200, Stefan (metze) Metzmacher wrote:
> > I am referring to this code :
> > 	unless (hasType($e)) {
> > 	    # it must be an external type - all we can do is guess
> > 		# warning($e, "assuming alignment of unknown type '$e' is 4");
> > 	    return 4;
> > 	}

> > I dont if you rely on this and that unknown types default to 4bytes,
> > so I cant estimate if or how much it would break if this would become
> > a die("...")

> Yes, it's a bug, but it's not trivial to fix for the samba case.
> We need to implement the 'import' statement more correct
> and need to make the global %typelist dynamic for each file we
> process. Currently pidl is able to compile more than one idl file
> at a time (and samba uses this to speed up the compilation),
> but the problem is that types are not removed between the compilations
> of different files.
This optimization is a bit of a hack anyway (i.e. because of the order
in which the compilation happens), so perhaps we should be looking for
the real speed issue and fix that; that way we could also just have
make invoke pidl separately.

This code could be a lot faster, what it's doing is not all that
complex. I suspect we're heavily using slow perl functions somewhere. 



More information about the samba-technical mailing list