summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-09-17 03:26:16 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2016-09-17 03:26:16 (GMT)
commit6d57fe1c23430d0d51de243a177670b76c37dab5 (patch)
tree8625e5f5e0b9e9f7a7bc02928757772e052f6886 /Modules
parent4a72a7b6c4c95f7613486f0e4e20a3d4815a16c5 (diff)
downloadcpython-6d57fe1c23430d0d51de243a177670b76c37dab5.zip
cpython-6d57fe1c23430d0d51de243a177670b76c37dab5.tar.gz
cpython-6d57fe1c23430d0d51de243a177670b76c37dab5.tar.bz2
Issue #28139: Fix messed up indentation
Also update the classmethod and staticmethod doc strings and comments to match the RST documentation.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_ctypes/_ctypes.c6
-rw-r--r--Modules/_localemodule.c3
-rw-r--r--Modules/fcntlmodule.c2
-rw-r--r--Modules/signalmodule.c14
-rw-r--r--Modules/socketmodule.c11
5 files changed, 19 insertions, 17 deletions
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c
index 7de9cee..2935292 100644
--- a/Modules/_ctypes/_ctypes.c
+++ b/Modules/_ctypes/_ctypes.c
@@ -5138,18 +5138,18 @@ comerror_init(PyObject *self, PyObject *args, PyObject *kwds)
int status;
if (!_PyArg_NoKeywords(Py_TYPE(self)->tp_name, kwds))
- return -1;
+ return -1;
if (!PyArg_ParseTuple(args, "OOO:COMError", &hresult, &text, &details))
return -1;
a = PySequence_GetSlice(args, 1, PySequence_Size(args));
if (!a)
- return -1;
+ return -1;
status = PyObject_SetAttrString(self, "args", a);
Py_DECREF(a);
if (status < 0)
- return -1;
+ return -1;
if (PyObject_SetAttrString(self, "hresult", hresult) < 0)
return -1;
diff --git a/Modules/_localemodule.c b/Modules/_localemodule.c
index b1d6add..b1307ef 100644
--- a/Modules/_localemodule.c
+++ b/Modules/_localemodule.c
@@ -54,9 +54,10 @@ copy_grouping(char* s)
int i;
PyObject *result, *val = NULL;
- if (s[0] == '\0')
+ if (s[0] == '\0') {
/* empty string: no grouping at all */
return PyList_New(0);
+ }
for (i = 0; s[i] != '\0' && s[i] != CHAR_MAX; i++)
; /* nothing */
diff --git a/Modules/fcntlmodule.c b/Modules/fcntlmodule.c
index 7bd18ac..8875b26 100644
--- a/Modules/fcntlmodule.c
+++ b/Modules/fcntlmodule.c
@@ -26,7 +26,7 @@ conv_descriptor(PyObject *object, int *target)
int fd = PyObject_AsFileDescriptor(object);
if (fd < 0)
- return 0;
+ return 0;
*target = fd;
return 1;
}
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c
index a1a18b0..753d987 100644
--- a/Modules/signalmodule.c
+++ b/Modules/signalmodule.c
@@ -154,18 +154,18 @@ itimer_retval(struct itimerval *iv)
r = PyTuple_New(2);
if (r == NULL)
- return NULL;
+ return NULL;
if(!(v = PyFloat_FromDouble(double_from_timeval(&iv->it_value)))) {
- Py_DECREF(r);
- return NULL;
+ Py_DECREF(r);
+ return NULL;
}
PyTuple_SET_ITEM(r, 0, v);
if(!(v = PyFloat_FromDouble(double_from_timeval(&iv->it_interval)))) {
- Py_DECREF(r);
- return NULL;
+ Py_DECREF(r);
+ return NULL;
}
PyTuple_SET_ITEM(r, 1, v);
@@ -1479,9 +1479,9 @@ PyInit__signal(void)
#if defined (HAVE_SETITIMER) || defined (HAVE_GETITIMER)
ItimerError = PyErr_NewException("signal.ItimerError",
- PyExc_IOError, NULL);
+ PyExc_IOError, NULL);
if (ItimerError != NULL)
- PyDict_SetItemString(d, "ItimerError", ItimerError);
+ PyDict_SetItemString(d, "ItimerError", ItimerError);
#endif
#ifdef CTRL_C_EVENT
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index d059617..3e1a460 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -1967,12 +1967,13 @@ getsockaddrlen(PySocketSockObject *s, socklen_t *len_ret)
return 1;
}
#endif /* AF_UNIX */
+
#if defined(AF_NETLINK)
- case AF_NETLINK:
- {
- *len_ret = sizeof (struct sockaddr_nl);
- return 1;
- }
+ case AF_NETLINK:
+ {
+ *len_ret = sizeof (struct sockaddr_nl);
+ return 1;
+ }
#endif
#ifdef AF_RDS