if(dump_to_strbuffer("\n", 1, (void *)&strbuff))
return NULL;
- result = strbuffer_value(&strbuff);
+ result = strdup(strbuffer_value(&strbuff));
strbuffer_close(&strbuff);
return result;
strbuffer_init(strbuff);
}
-char *strbuffer_value(strbuffer_t *strbuff)
+const char *strbuffer_value(strbuffer_t *strbuff)
{
- return strdup(strbuff->value);
+ return strbuff->value;
}
char *strbuffer_steal_value(strbuffer_t *strbuff)
void strbuffer_init(strbuffer_t *strbuff);
void strbuffer_close(strbuffer_t *strbuff);
-char *strbuffer_value(strbuffer_t *strbuff);
+const char *strbuffer_value(strbuffer_t *strbuff);
char *strbuffer_steal_value(strbuffer_t *strbuff);
int strbuffer_append(strbuffer_t *strbuff, const char *string);