Issue #24366: Fix indentation
Backports changes by Victor Stinner, Hirokazu Yamamoto, li4ick and Benjamin
Peterson.
diff --git a/Modules/cjkcodecs/multibytecodec.c b/Modules/cjkcodecs/multibytecodec.c
index 2f2eb52..8713628 100644
--- a/Modules/cjkcodecs/multibytecodec.c
+++ b/Modules/cjkcodecs/multibytecodec.c
@@ -1275,19 +1275,19 @@
if (PyString_GET_SIZE(cres) > PY_SSIZE_T_MAX - self->pendingsize) {
PyErr_NoMemory();
goto errorexit;
- }
- rsize = PyString_GET_SIZE(cres) + self->pendingsize;
- ctr = PyString_FromStringAndSize(NULL, rsize);
- if (ctr == NULL)
- goto errorexit;
- ctrdata = PyString_AS_STRING(ctr);
- memcpy(ctrdata, self->pending, self->pendingsize);
- memcpy(ctrdata + self->pendingsize,
- PyString_AS_STRING(cres),
- PyString_GET_SIZE(cres));
- Py_DECREF(cres);
- cres = ctr;
- self->pendingsize = 0;
+ }
+ rsize = PyString_GET_SIZE(cres) + self->pendingsize;
+ ctr = PyString_FromStringAndSize(NULL, rsize);
+ if (ctr == NULL)
+ goto errorexit;
+ ctrdata = PyString_AS_STRING(ctr);
+ memcpy(ctrdata, self->pending, self->pendingsize);
+ memcpy(ctrdata + self->pendingsize,
+ PyString_AS_STRING(cres),
+ PyString_GET_SIZE(cres));
+ Py_DECREF(cres);
+ cres = ctr;
+ self->pendingsize = 0;
}
rsize = PyString_GET_SIZE(cres);
diff --git a/Modules/zipimport.c b/Modules/zipimport.c
index 8362983..1691773 100644
--- a/Modules/zipimport.c
+++ b/Modules/zipimport.c
@@ -380,13 +380,13 @@
if (!PyArg_ParseTuple(args, "s:zipimporter.get_filename",
&fullname))
- return NULL;
+ return NULL;
/* Deciding the filename requires working out where the code
would come from if the module was actually loaded */
code = get_module_code(self, fullname, &ispackage, &modpath);
if (code == NULL)
- return NULL;
+ return NULL;
Py_DECREF(code); /* Only need the path info */
return PyString_FromString(modpath);
@@ -689,7 +689,7 @@
A toc_entry is a tuple:
- (__file__, # value to use for __file__, available for all files
+ (__file__, # value to use for __file__, available for all files
compress, # compression kind; 0 for uncompressed
data_size, # size of compressed data on disk
file_size, # size of decompressed data
@@ -697,7 +697,7 @@
time, # mod time of file (in dos format)
date, # mod data of file (in dos format)
crc, # crc checksum of the data
- )
+ )
Directories can be recognized by the trailing SEP in the name,
data_size and file_offset are 0.