[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Reference counts?
Just a loose idea...
Ownership often seems a bit hairy to keep track of, like ITS#4550
just now. I've been wondering if it would ease things up to add
reference counts to some objects, but I don't know just when it
would be useful...
Maybe berval-like constant strings instead of rs->sr_text/sr_matched,
for example:
struct ber_rval {
ber_len_t bv_len;
ber_uint_t bv_refcount; /* or maybe just "unsigned" is enough */
const char bv_val[1];
/* add strlen() to allocated size, terminate with \0 */
};
--
Hallvard