Kristján Valur Jónsson added the comment:

I thought I had explained this already, but can't find it, so here is the 
explanation:
It matches the pattern of r_ref(), which semantically is a combination of 
r_ref_register() and r_ref_insert().

It is a convenence calling pattern because these functions will either:
a) pass a NULL operand through,
b) succeed and pass the non-NULL operatn through
c) fail, and release the operand and return NULL.
In all cases, it is sufficient to look at the value of the operand after this 
transformation to know if everything was allright.  This simplifies all the 
calling sites where these things are used, e.g. by the R_REF() macro.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16475>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to