Conversion from apointer to a seq

2024-06-21 Thread phoenix27
Thank you. Then it's a bit like Pascal, which always had me confused because of that. Now i understand it better

Conversion from apointer to a seq

2024-06-20 Thread PMunch
> Is it because the original sequence, once dereferenced, is copied to "var > arr", hence "cols" is not added to it but to a copy which is deleted once the > proc returns? Yup, spot on

Conversion from apointer to a seq

2024-06-20 Thread Alogani
Good question, I don't remember any cases. So, let's just say this is skill issue on my part ;-) and that result variable can be used and abused (i see no reported issues about it)

Conversion from apointer to a seq

2024-06-20 Thread Alogani
Hello @phoenix27, Sorry to be straightforward, but you are doing all wrong ! ;-) If I'm not mistaken, the seq object looks like this () : type NimSeqPayload[T] = object

Conversion from apointer to a seq

2024-06-20 Thread ElegantBeef
> I have found the result variable it a little "touchy" sometimes. In what way?

Conversion from apointer to a seq

2024-06-20 Thread phoenix27
type TRow = seq[string] TRows = seq[TRow] proc dbGetRowsCb(arr: pointer; colCount: int32; values, columns: cstringArray): int32 {.cdecl.} = var cols:TRow for i in 0..