Nim does allow importing fields with specific names. So you could rename the 
field `typ` or `kind`. As the following does.
    
    
    type
        AType {.importc: "AType", header: "somewhere.h".} = object
            kind {.importc: "type".}: cint # could also name this `typ`
            another: cint
    
    
    ...
    
    var t: AType
    t.kind = 1
    t.another = 2
    
    
    Run

Reply via email to