On 04/ 5/10 03:33 PM, [email protected] wrote:
On Mon, Apr 05, 2010 at 01:52:45PM -0500, Shawn Walker wrote:
webrev against gate tip:
http://cr.opensolaris.org/~swalker/pkg-slots-2/
Thanks, this looks a lot better. Just nits now:
_actions.c:
- lines 268, 288, and 329: Is it ever possible that your refcount
won't go to zero after this decref? Would that cause any problems?
Won't go to zero? Yes, because this code can encounter multiple
attributes for the same action. However, I don't believe it will cause
any problems, and I've tested this by hand-checking refcounts in
different scenarios. Memory usage also remains almost exactly as it was
before I made the refcount changes, so I believe these to be correct.
- _fromstr(): Would it make sense to create a macro for the following
bit of code:
Py_XDECREF(attr);
Py_XDECREF(attrs);
Py_XDECREF(hash);
Py_XDECREF(key);
Py_XDECREF(type);
And just call that instead of typing out the xdecrefs every single
time?
Except that would be decrementing more than I am now. A lot of the
error cases only decrement attrs, key, and attr. Are you saying the
other cases should be decrementing hash, key, and type anytime they do a
"return (NULL);" ? If so, then yes, the macro would make sense.
-Shawn
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss