mirror of
https://github.com/python/cpython.git
synced 2025-11-02 19:12:55 +00:00
Fold long lines.
This commit is contained in:
parent
6a600aba2d
commit
f6c9ba8457
1 changed files with 7 additions and 4 deletions
|
|
@ -1,6 +1,5 @@
|
||||||
/* Abstract Object Interface (many thanks to Jim Fulton) */
|
/* Abstract Object Interface (many thanks to Jim Fulton) */
|
||||||
|
|
||||||
|
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include "structmember.h" /* we need the offsetof() macro from there */
|
#include "structmember.h" /* we need the offsetof() macro from there */
|
||||||
|
|
@ -2093,16 +2092,20 @@ PyObject_IsSubclass(PyObject *derived, PyObject *cls)
|
||||||
int retval;
|
int retval;
|
||||||
|
|
||||||
if (!PyClass_Check(derived) || !PyClass_Check(cls)) {
|
if (!PyClass_Check(derived) || !PyClass_Check(cls)) {
|
||||||
if (!check_class(derived, "issubclass() arg 1 must be a class"))
|
if (!check_class(derived,
|
||||||
|
"issubclass() arg 1 must be a class"))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (PyTuple_Check(cls)) {
|
if (PyTuple_Check(cls)) {
|
||||||
int i;
|
int i;
|
||||||
int n = PyTuple_GET_SIZE(cls);
|
int n = PyTuple_GET_SIZE(cls);
|
||||||
for (i = 0; i < n; ++i) {
|
for (i = 0; i < n; ++i) {
|
||||||
retval = PyObject_IsSubclass(derived, PyTuple_GET_ITEM(cls, i));
|
retval = PyObject_IsSubclass(
|
||||||
if (retval != 0) /* either found it, or got an error */
|
derived, PyTuple_GET_ITEM(cls, i));
|
||||||
|
if (retval != 0) {
|
||||||
|
/* either found it, or got an error */
|
||||||
return retval;
|
return retval;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue