comparison Python/ceval.c @ 19600:1cece743a708 legacy-trunk

Removed some unreachable break statements to silence SGI compiler.
author Sjoerd Mullender <sjoerd@acm.org>
date Thu, 30 Aug 2001 14:05:20 +0000
parents c140bd7d3bdc
children 8f035800a373
comparison
equal deleted inserted replaced
19599:00de719ae831 19600:1cece743a708
3047 PyObject *args = load_args(pp_stack, na); 3047 PyObject *args = load_args(pp_stack, na);
3048 PyObject *result = (*meth)(self, args); 3048 PyObject *result = (*meth)(self, args);
3049 Py_DECREF(args); 3049 Py_DECREF(args);
3050 return result; 3050 return result;
3051 } 3051 }
3052 break;
3053 case METH_NOARGS: 3052 case METH_NOARGS:
3054 if (na == 0) 3053 if (na == 0)
3055 return (*meth)(self, NULL); 3054 return (*meth)(self, NULL);
3056 PyErr_Format(PyExc_TypeError, 3055 PyErr_Format(PyExc_TypeError,
3057 "%.200s() takes no arguments (%d given)", 3056 "%.200s() takes no arguments (%d given)",
3058 ((PyCFunctionObject*)func)->m_ml->ml_name, na); 3057 ((PyCFunctionObject*)func)->m_ml->ml_name, na);
3059 return NULL; 3058 return NULL;
3060 break;
3061 case METH_O: 3059 case METH_O:
3062 if (na == 1) { 3060 if (na == 1) {
3063 PyObject *arg = EXT_POP(*pp_stack); 3061 PyObject *arg = EXT_POP(*pp_stack);
3064 PyObject *result = (*meth)(self, arg); 3062 PyObject *result = (*meth)(self, arg);
3065 Py_DECREF(arg); 3063 Py_DECREF(arg);
3067 } 3065 }
3068 PyErr_Format(PyExc_TypeError, 3066 PyErr_Format(PyExc_TypeError,
3069 "%.200s() takes exactly one argument (%d given)", 3067 "%.200s() takes exactly one argument (%d given)",
3070 ((PyCFunctionObject*)func)->m_ml->ml_name, na); 3068 ((PyCFunctionObject*)func)->m_ml->ml_name, na);
3071 return NULL; 3069 return NULL;
3072 break;
3073 default: 3070 default:
3074 fprintf(stderr, "%.200s() flags = %d\n", 3071 fprintf(stderr, "%.200s() flags = %d\n",
3075 ((PyCFunctionObject*)func)->m_ml->ml_name, flags); 3072 ((PyCFunctionObject*)func)->m_ml->ml_name, flags);
3076 PyErr_BadInternalCall(); 3073 PyErr_BadInternalCall();
3077 return NULL; 3074 return NULL;