[foreign] RFR 8220544: Jextract; library dependent header filtering
    Maurizio Cimadamore 
    maurizio.cimadamore at oracle.com
       
    Thu Mar 14 11:01:51 UTC 2019
    
    
  
On 14/03/2019 00:14, Jorn Vernee wrote:
> 42 intermediate typedefs seems a bit extreme... 
I agree - I was deliberately exaggerating for the sake of the example :-)
The main point is: a typedef is used to define a 'local' type name; that 
is a type alias that is likely to be used consistently across the 
library - as such, I think we should prioritize aliases introduced by 
the root set, over aliases introduced deeper in the recursion chain.
Concrete example, OpenGL:
typedef void            GLvoid;
When I see this, I can conclude with 99% certainty that the header will 
prefer using GLvoid to just a plain void. Now, in this case, 'void' is a 
primitive, and not another typedef, but the essence doesn't change - the 
header is setting up its own hierarchy of types which will then be used 
uniformly throughout. Leaking type names from lower layers seems a 
source of confusion IMHO.
Maurizio
    
    
More information about the panama-dev
mailing list