aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/src/Objects/bytes_methods.c
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.ru>2022-02-10 16:44:30 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:30 +0300
commit2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch)
tree012bb94d777798f1f56ac1cec429509766d05181 /contrib/tools/python3/src/Objects/bytes_methods.c
parent6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff)
downloadydb-2598ef1d0aee359b4b6d5fdd1758916d5907d04f.tar.gz
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/tools/python3/src/Objects/bytes_methods.c')
-rw-r--r--contrib/tools/python3/src/Objects/bytes_methods.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/contrib/tools/python3/src/Objects/bytes_methods.c b/contrib/tools/python3/src/Objects/bytes_methods.c
index 72daa1fdd5..3f625b8a17 100644
--- a/contrib/tools/python3/src/Objects/bytes_methods.c
+++ b/contrib/tools/python3/src/Objects/bytes_methods.c
@@ -1,7 +1,7 @@
#define PY_SSIZE_T_CLEAN
#include "Python.h"
-#include "pycore_abstract.h" // _PyIndex_Check()
-#include "pycore_bytes_methods.h"
+#include "pycore_abstract.h" // _PyIndex_Check()
+#include "pycore_bytes_methods.h"
PyDoc_STRVAR_shared(_Py_isspace__doc__,
"B.isspace() -> bool\n\
@@ -13,7 +13,7 @@ PyObject*
_Py_bytes_isspace(const char *cptr, Py_ssize_t len)
{
const unsigned char *p
- = (const unsigned char *) cptr;
+ = (const unsigned char *) cptr;
const unsigned char *e;
/* Shortcut for single character strings */
@@ -43,7 +43,7 @@ PyObject*
_Py_bytes_isalpha(const char *cptr, Py_ssize_t len)
{
const unsigned char *p
- = (const unsigned char *) cptr;
+ = (const unsigned char *) cptr;
const unsigned char *e;
/* Shortcut for single character strings */
@@ -73,7 +73,7 @@ PyObject*
_Py_bytes_isalnum(const char *cptr, Py_ssize_t len)
{
const unsigned char *p
- = (const unsigned char *) cptr;
+ = (const unsigned char *) cptr;
const unsigned char *e;
/* Shortcut for single character strings */
@@ -124,7 +124,7 @@ _Py_bytes_isascii(const char *cptr, Py_ssize_t len)
/* Help allocation */
const char *_p = p;
while (_p < aligned_end) {
- unsigned long value = *(const unsigned long *) _p;
+ unsigned long value = *(const unsigned long *) _p;
if (value & ASCII_CHAR_MASK) {
Py_RETURN_FALSE;
}
@@ -155,7 +155,7 @@ PyObject*
_Py_bytes_isdigit(const char *cptr, Py_ssize_t len)
{
const unsigned char *p
- = (const unsigned char *) cptr;
+ = (const unsigned char *) cptr;
const unsigned char *e;
/* Shortcut for single character strings */
@@ -185,7 +185,7 @@ PyObject*
_Py_bytes_islower(const char *cptr, Py_ssize_t len)
{
const unsigned char *p
- = (const unsigned char *) cptr;
+ = (const unsigned char *) cptr;
const unsigned char *e;
int cased;
@@ -219,7 +219,7 @@ PyObject*
_Py_bytes_isupper(const char *cptr, Py_ssize_t len)
{
const unsigned char *p
- = (const unsigned char *) cptr;
+ = (const unsigned char *) cptr;
const unsigned char *e;
int cased;
@@ -255,7 +255,7 @@ PyObject*
_Py_bytes_istitle(const char *cptr, Py_ssize_t len)
{
const unsigned char *p
- = (const unsigned char *) cptr;
+ = (const unsigned char *) cptr;
const unsigned char *e;
int cased, previous_is_cased;
@@ -362,9 +362,9 @@ and the rest lower-cased.");
void
_Py_bytes_capitalize(char *result, const char *s, Py_ssize_t len)
{
- if (len > 0) {
- *result = Py_TOUPPER(*s);
- _Py_bytes_lower(result + 1, s + 1, len - 1);
+ if (len > 0) {
+ *result = Py_TOUPPER(*s);
+ _Py_bytes_lower(result + 1, s + 1, len - 1);
}
}
@@ -467,7 +467,7 @@ parse_args_finds_byte(const char *function_name, PyObject *args,
return 1;
}
- if (!_PyIndex_Check(tmp_subobj)) {
+ if (!_PyIndex_Check(tmp_subobj)) {
PyErr_Format(PyExc_TypeError,
"argument should be integer or bytes-like object, "
"not '%.200s'",
@@ -744,7 +744,7 @@ tailmatch(const char *str, Py_ssize_t len, PyObject *substr,
if (direction < 0) {
/* startswith */
- if (start > len - slen)
+ if (start > len - slen)
goto notfound;
} else {
/* endswith */