Something like the following should work (warning, untested code): type Val* = object mvSize*: csize #*< size of the data item mvData*: pointer #*< address of the data item proc valToString*(v: Val): string = result = newString(v.mvSize) copyMem(addr result[0], v.mvData, v.mvSize)
- Generic Pointer Question Nimbecile
- Re: Generic Pointer Question Stefan_Salewski
- Re: Generic Pointer Question Nimbecile
- Re: Generic Pointer Question Stefan_Salewski
- Re: Generic Pointer Question xomachine
- Re: Generic Pointer Question Jehan