summaryrefslogtreecommitdiffstats
path: root/Modules/_opcode.c
diff options
context:
space:
mode:
authorLarry Hastings <larry@hastings.org>2014-01-22 11:05:49 (GMT)
committerLarry Hastings <larry@hastings.org>2014-01-22 11:05:49 (GMT)
commit462582651c92dad3d0e50810075d53d4a04e2466 (patch)
tree8306867e6d7c27d4fda979bde24aef0869015abd /Modules/_opcode.c
parent071baa63c4ea3a54a54d90b173dd777e08895976 (diff)
downloadcpython-462582651c92dad3d0e50810075d53d4a04e2466.zip
cpython-462582651c92dad3d0e50810075d53d4a04e2466.tar.gz
cpython-462582651c92dad3d0e50810075d53d4a04e2466.tar.bz2
Two minor Argument Clinic bugfixes: use the name of the class in the
docstring for __new__ and __init__, and always use "goto exit" instead of returning "NULL" for failure to parse (as _new__ and __init__ return ints).
Diffstat (limited to 'Modules/_opcode.c')
-rw-r--r--Modules/_opcode.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_opcode.c b/Modules/_opcode.c
index 2e84699..633c4f8 100644
--- a/Modules/_opcode.c
+++ b/Modules/_opcode.c
@@ -42,16 +42,16 @@ _opcode_stack_effect(PyModuleDef *module, PyObject *args)
switch (PyTuple_GET_SIZE(args)) {
case 1:
if (!PyArg_ParseTuple(args, "i:stack_effect", &opcode))
- return NULL;
+ goto exit;
break;
case 2:
if (!PyArg_ParseTuple(args, "ii:stack_effect", &opcode, &oparg))
- return NULL;
+ goto exit;
group_right_1 = 1;
break;
default:
PyErr_SetString(PyExc_TypeError, "_opcode.stack_effect requires 1 to 2 arguments");
- return NULL;
+ goto exit;
}
_return_value = _opcode_stack_effect_impl(module, opcode, group_right_1, oparg);
if ((_return_value == -1) && PyErr_Occurred())
@@ -64,7 +64,7 @@ exit:
static int
_opcode_stack_effect_impl(PyModuleDef *module, int opcode, int group_right_1, int oparg)
-/*[clinic end generated code: checksum=47e76ec27523da4ab192713642d32482cd743aa4]*/
+/*[clinic end generated code: checksum=58fb4f1b174fc92f783dc945ca712fb752a6c283]*/
{
int effect;
if (HAS_ARG(opcode)) {