The c2nim translation posted by jlp765 is correct. But i found something wrong 
when c2nim try to translate the _usage_ of the typedefed type. Sorry not to 
mention them earlier.
    
    
    typedef int xxx(int yyy);
    
    xxx abc;
    
    void zzz(xxx* f);
    void www(xxx f);
    

zzz and www should produce the same result because they are equivalent. abc 
should be function declaration, but see how c2nim translate them:
    
    
    type
      xxx* = proc (yyy: cint): cint
    
    var abc*: xxx  #wrong, should be proc abc(yyy: int): cint
    
    proc zzz*(f: ptr xxx) #wrong
    proc www*(f: xxx)
    

imagine if this is used to importc something, crash will it be

Reply via email to