4 ms·
Doesn't libcurl encourage allocating linked lists on the stack for passing options to functions? IIRC a lot of functions take too many options to be practically
by adrusi 11y ago
Doesn't libcurl encourage allocating linked lists on the stack for passing options to functions? IIRC a lot of functions take too many options to be practically specified as arguments so they have a datatype something like
struct opt {
enum option_specifier id;
void *val;
struct opt *next;
};
And the functions that accept these option lists don't take ownership of them, so they're safe to allocated on the stack.
- rumcajz 11y agoYes. That sound like the same thing.