Hello

I'm looking for help for the following snippet 
    
    
    let sq = @["hello", "nim"]
    
    
    proc cFunction(a1: pointer) =
            # How to cast the pointer to seq[string]
    
    proc main() =
          # How to call cFunction and send sq as a c void pointer
    
    
    Run

I have most of the time type mismatch when using
    
    
    cFunction(cast[pointer](sq[0].addr))
    
    cFunction(sq.unsafeAddr)
    
    cFunction(sq[0].unsafeAddr)
    
    
    Run

Reply via email to