summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2001-05-18 20:57:38 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2001-05-18 20:57:38 (GMT)
commit0f8117f14a98d697828b96ec1130105332f67dad (patch)
treeeadb5ca3c49d99c90d6bf1dca3bb56f4fa4da1dc /Python
parentda20fce9c329acd8cf06162bd22be6e9b1fc1bc8 (diff)
downloadcpython-0f8117f14a98d697828b96ec1130105332f67dad.zip
cpython-0f8117f14a98d697828b96ec1130105332f67dad.tar.gz
cpython-0f8117f14a98d697828b96ec1130105332f67dad.tar.bz2
vgetargs1() and vgetargskeywords(): Replace uses of PyTuple_Size() and
PyTuple_GetItem() with PyTuple_GET_SIZE() and PyTuple_GET_ITEM(). The code has already done a PyTuple_Check().
Diffstat (limited to 'Python')
-rw-r--r--Python/getargs.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/Python/getargs.c b/Python/getargs.c
index d78faa7..21815f9 100644
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -112,7 +112,7 @@ vgetargs1(PyObject *args, char *format, va_list *p_va, int compat)
}
else if (level != 0)
; /* Pass */
- else if (c == 'e')
+ else if (c == 'e')
; /* Pass */
else if (isalpha(c))
max++;
@@ -166,7 +166,7 @@ vgetargs1(PyObject *args, char *format, va_list *p_va, int compat)
return 0;
}
- len = PyTuple_Size(args);
+ len = PyTuple_GET_SIZE(args);
if (len < min || max < len) {
if (message == NULL) {
@@ -188,8 +188,8 @@ vgetargs1(PyObject *args, char *format, va_list *p_va, int compat)
for (i = 0; i < len; i++) {
if (*format == '|')
format++;
- msg = convertitem(PyTuple_GetItem(args, i), &format, p_va,
- levels, msgbuf);
+ msg = convertitem(PyTuple_GET_ITEM(args, i), &format, p_va,
+ levels, msgbuf);
if (msg) {
seterror(i+1, msg, levels, fname, message);
return 0;
@@ -1011,12 +1011,10 @@ vgetargskeywords(PyObject *args, PyObject *keywords, char *format,
else if (c == ':') {
fname = format;
break;
- }
- else if (c == ';') {
+ } else if (c == ';') {
message = format;
break;
- }
- else if (c == 'e')
+ } else if (c == 'e')
; /* Pass */
else if (isalpha(c))
max++;
@@ -1035,7 +1033,7 @@ vgetargskeywords(PyObject *args, PyObject *keywords, char *format,
return 0;
}
- tplen = PyTuple_Size(args);
+ tplen = PyTuple_GET_SIZE(args);
/* do a cursory check of the keywords just to see how many we got */
@@ -1111,7 +1109,7 @@ vgetargskeywords(PyObject *args, PyObject *keywords, char *format,
for (i = 0; i < tplen; i++) {
if (*format == '|')
format++;
- msg = convertitem(PyTuple_GetItem(args, i), &format, p_va,
+ msg = convertitem(PyTuple_GET_ITEM(args, i), &format, p_va,
levels, msgbuf);
if (msg) {
seterror(i+1, msg, levels, fname, message);