Patch #1648268 corrects a huge load of errors in Python wrt. incorrect function pointers (i.e. functions called with a different signature then declared, through pointers). The rationale for this patch is that the submitter apparently has a platform where Python crashes in the face of these errors. I believe the patch is correct, and would like to apply it. The patch also renames many function arguments: parameters in a METH_NOARGS function get consistently named NOARGS_NULL (currently often called 'unused' or 'noargs'); the second parameter to getters gets consistently named 'closure' (it's called closure in many places already, and 'unused' in others). I would also apply this part of the change, and both to the trunk and Python 2.5. Objections? Regards, Martin
My only objection (which is a minor one) is with the 'NOARGS_NULL' name.
Caps don't fit the normal style rules, and 'noargs_null' doesn't make much
sense to me. 'unused' strikes me as a clearer name (or 'noargs_unused' or
'args_unused' or such.) It should be fine to fix this in 2.5 as well (as
long as arguments previously ignored don't suddenly raise exceptions, but it
doesn't sound like that's happening at all.)
On 2/18/07, "Martin v. Löwis"
Patch #1648268 corrects a huge load of errors in Python wrt. incorrect function pointers (i.e. functions called with a different signature then declared, through pointers). The rationale for this patch is that the submitter apparently has a platform where Python crashes in the face of these errors.
I believe the patch is correct, and would like to apply it.
The patch also renames many function arguments: parameters in a METH_NOARGS function get consistently named NOARGS_NULL (currently often called 'unused' or 'noargs'); the second parameter to getters gets consistently named 'closure' (it's called closure in many places already, and 'unused' in others).
I would also apply this part of the change, and both to the trunk and Python 2.5. Objections?
Regards, Martin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/thomas%40python.org
--
Thomas Wouters
Thomas Wouters schrieb:
My only objection (which is a minor one) is with the 'NOARGS_NULL' name. Caps don't fit the normal style rules, and 'noargs_null' doesn't make much sense to me. 'unused' strikes me as a clearer name (or 'noargs_unused' or 'args_unused' or such.)
The point clearly is that the submitter wants the code to explain what the meaning of the parameter is, and why it is unused. NOARGS_NULL is intended to express that the argument will always be NULL (and thus obviously irrelevant). It's easy to see from the code that the parameter is unused, so it doesn't give much information calling it unused; OTOH it may not be so obvious what information the caller will provide (i.e. whether it's an argument tuple, or the "closure" field).
It should be fine to fix this in 2.5 as well (as long as arguments previously ignored don't suddenly raise exceptions, but it doesn't sound like that's happening at all.)
That change does not change behaviour at all. Regards, Martin
participants (2)
-
"Martin v. Löwis"
-
Thomas Wouters