Y
Hacker News
new
|
ask
|
show
|
jobs
by
teaspoon
5279 days ago
Ruby strings are mutable, so you need to be able to free
s->data
without freeing the RString itself.
1 comments
ori_b
5279 days ago
s = realloc(s, sizeof(RString));
link
charliesome
5279 days ago
MRI objects are not relocatable so that won't work if realloc has to move the structure in memory
link