We can't really return a record pointer because the thing pointed to would be immediately de-allocated and we can't return records with pointers to strings because the strings would be de-allocated, but we can return records by-value otherwise. If you do really need a string member to your record, you can strdup it and store it as an opaque. Be careful of the allocation though!
We can't really return a record pointer because the thing pointed to would be immediately de-allocated and we can't return records with pointers to strings because the strings would be de-allocated, but we can return records by-value otherwise. If you do really need a string member to your record, you can
strdup
it and store it as an opaque. Be careful of the allocation though!