4 ms·
I was more thinking about the combination of caller provided object and callee returning a pointer (in this case to the same object). But I suppose it decouple
by e12e 5y ago
I was more thinking about the combination of caller provided object and callee returning a pointer (in this case to the same object).
But I suppose it decouples "call time" resources from "return time" resources (the current api does not guarantee that the result will be in caller's "out", just that a buffer will be returned that the caller owns and have to de-allocate/manage).
- eqvinox 5y agoThat's a common (I wouldn't necessarily call it "standard") C idiom, to allow chaining calls. You could e.g. do puts(reverse(fwdbuf, reverse(revbuf, input)));