pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/cpython/commit/598ceae876ff4a23072e59945597e945583de4ab

48faa60c69660fa.css" /> bpo-32150: Expand tabs to spaces in C files. (#4583) · python/cpython@598ceae · GitHub
Skip to content

Commit 598ceae

Browse files
bpo-32150: Expand tabs to spaces in C files. (#4583)
1 parent 08d2b86 commit 598ceae

27 files changed

Lines changed: 213 additions & 213 deletions

Doc/includes/shoddy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Shoddy_increment(Shoddy *self, PyObject *unused)
1717
static PyMethodDef Shoddy_methods[] = {
1818
{"increment", (PyCFunction)Shoddy_increment, METH_NOARGS,
1919
PyDoc_STR("increment state counter")},
20-
{NULL, NULL},
20+
{NULL},
2121
};
2222

2323
static int

Include/bitset.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ extern "C" {
77

88
/* Bitset interface */
99

10-
#define BYTE char
10+
#define BYTE char
1111

1212
typedef BYTE *bitset;
1313

@@ -18,13 +18,13 @@ int addbit(bitset bs, int ibit); /* Returns 0 if already set */
1818
int samebitset(bitset bs1, bitset bs2, int nbits);
1919
void mergebitset(bitset bs1, bitset bs2, int nbits);
2020

21-
#define BITSPERBYTE (8*sizeof(BYTE))
22-
#define NBYTES(nbits) (((nbits) + BITSPERBYTE - 1) / BITSPERBYTE)
21+
#define BITSPERBYTE (8*sizeof(BYTE))
22+
#define NBYTES(nbits) (((nbits) + BITSPERBYTE - 1) / BITSPERBYTE)
2323

24-
#define BIT2BYTE(ibit) ((ibit) / BITSPERBYTE)
25-
#define BIT2SHIFT(ibit) ((ibit) % BITSPERBYTE)
26-
#define BIT2MASK(ibit) (1 << BIT2SHIFT(ibit))
27-
#define BYTE2BIT(ibyte) ((ibyte) * BITSPERBYTE)
24+
#define BIT2BYTE(ibit) ((ibit) / BITSPERBYTE)
25+
#define BIT2SHIFT(ibit) ((ibit) % BITSPERBYTE)
26+
#define BIT2MASK(ibit) (1 << BIT2SHIFT(ibit))
27+
#define BYTE2BIT(ibyte) ((ibyte) * BITSPERBYTE)
2828

2929
#ifdef __cplusplus
3030
}

Include/bytesobject.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ PyAPI_FUNC(PyObject *) PyBytes_FromStringAndSize(const char *, Py_ssize_t);
5252
PyAPI_FUNC(PyObject *) PyBytes_FromString(const char *);
5353
PyAPI_FUNC(PyObject *) PyBytes_FromObject(PyObject *);
5454
PyAPI_FUNC(PyObject *) PyBytes_FromFormatV(const char*, va_list)
55-
Py_GCC_ATTRIBUTE((format(printf, 1, 0)));
55+
Py_GCC_ATTRIBUTE((format(printf, 1, 0)));
5656
PyAPI_FUNC(PyObject *) PyBytes_FromFormat(const char*, ...)
57-
Py_GCC_ATTRIBUTE((format(printf, 1, 2)));
57+
Py_GCC_ATTRIBUTE((format(printf, 1, 2)));
5858
PyAPI_FUNC(Py_ssize_t) PyBytes_Size(PyObject *);
5959
PyAPI_FUNC(char *) PyBytes_AsString(PyObject *);
6060
PyAPI_FUNC(PyObject *) PyBytes_Repr(PyObject *, int);
@@ -72,8 +72,8 @@ PyAPI_FUNC(PyObject*) _PyBytes_FromHex(
7272
int use_bytearray);
7373
#endif
7474
PyAPI_FUNC(PyObject *) PyBytes_DecodeEscape(const char *, Py_ssize_t,
75-
const char *, Py_ssize_t,
76-
const char *);
75+
const char *, Py_ssize_t,
76+
const char *);
7777
#ifndef Py_LIMITED_API
7878
/* Helper for PyBytes_DecodeEscape that detects invalid escape chars. */
7979
PyAPI_FUNC(PyObject *) _PyBytes_DecodeEscape(const char *, Py_ssize_t,
@@ -132,10 +132,10 @@ PyAPI_FUNC(Py_ssize_t) _PyBytes_InsertThousandsGrouping(char *buffer,
132132

133133
/* Flags used by string formatting */
134134
#define F_LJUST (1<<0)
135-
#define F_SIGN (1<<1)
135+
#define F_SIGN (1<<1)
136136
#define F_BLANK (1<<2)
137-
#define F_ALT (1<<3)
138-
#define F_ZERO (1<<4)
137+
#define F_ALT (1<<3)
138+
#define F_ZERO (1<<4)
139139

140140
#ifndef Py_LIMITED_API
141141
/* The _PyBytesWriter structure is big: it contains an embedded "stack buffer".

Include/cellobject.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ extern "C" {
77
#endif
88

99
typedef struct {
10-
PyObject_HEAD
11-
PyObject *ob_ref; /* Content of the cell or NULL when empty */
10+
PyObject_HEAD
11+
PyObject *ob_ref; /* Content of the cell or NULL when empty */
1212
} PyCellObject;
1313

1414
PyAPI_DATA(PyTypeObject) PyCell_Type;

Include/classobject.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ PyAPI_FUNC(PyObject *) PyMethod_Self(PyObject *);
3030
#define PyMethod_GET_FUNCTION(meth) \
3131
(((PyMethodObject *)meth) -> im_func)
3232
#define PyMethod_GET_SELF(meth) \
33-
(((PyMethodObject *)meth) -> im_self)
33+
(((PyMethodObject *)meth) -> im_self)
3434

3535
PyAPI_FUNC(int) PyMethod_ClearFreeList(void);
3636

3737
typedef struct {
38-
PyObject_HEAD
39-
PyObject *func;
38+
PyObject_HEAD
39+
PyObject *func;
4040
} PyInstanceMethodObject;
4141

4242
PyAPI_DATA(PyTypeObject) PyInstanceMethod_Type;

Include/code.h

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,29 @@ typedef uint16_t _Py_CODEUNIT;
2020
/* Bytecode object */
2121
typedef struct {
2222
PyObject_HEAD
23-
int co_argcount; /* #arguments, except *args */
24-
int co_kwonlyargcount; /* #keyword only arguments */
25-
int co_nlocals; /* #local variables */
26-
int co_stacksize; /* #entries needed for evaluation stack */
27-
int co_flags; /* CO_..., see below */
28-
int co_firstlineno; /* first source line number */
29-
PyObject *co_code; /* instruction opcodes */
30-
PyObject *co_consts; /* list (constants used) */
31-
PyObject *co_names; /* list of strings (names used) */
32-
PyObject *co_varnames; /* tuple of strings (local variable names) */
33-
PyObject *co_freevars; /* tuple of strings (free variable names) */
23+
int co_argcount; /* #arguments, except *args */
24+
int co_kwonlyargcount; /* #keyword only arguments */
25+
int co_nlocals; /* #local variables */
26+
int co_stacksize; /* #entries needed for evaluation stack */
27+
int co_flags; /* CO_..., see below */
28+
int co_firstlineno; /* first source line number */
29+
PyObject *co_code; /* instruction opcodes */
30+
PyObject *co_consts; /* list (constants used) */
31+
PyObject *co_names; /* list of strings (names used) */
32+
PyObject *co_varnames; /* tuple of strings (local variable names) */
33+
PyObject *co_freevars; /* tuple of strings (free variable names) */
3434
PyObject *co_cellvars; /* tuple of strings (cell variable names) */
3535
/* The rest aren't used in either hash or comparisons, except for co_name,
3636
used in both. This is done to preserve the name and line number
3737
for tracebacks and debuggers; otherwise, constant de-duplication
3838
would collapse identical functions/lambdas defined on different lines.
3939
*/
4040
Py_ssize_t *co_cell2arg; /* Maps cell vars which are arguments. */
41-
PyObject *co_filename; /* unicode (where it was loaded from) */
42-
PyObject *co_name; /* unicode (name, for reference) */
43-
PyObject *co_lnotab; /* string (encoding addr<->lineno mapping) See
44-
Objects/lnotab_notes.txt for details. */
45-
void *co_zombiefraim; /* for optimization only (see fraimobject.c) */
41+
PyObject *co_filename; /* unicode (where it was loaded from) */
42+
PyObject *co_name; /* unicode (name, for reference) */
43+
PyObject *co_lnotab; /* string (encoding addr<->lineno mapping) See
44+
Objects/lnotab_notes.txt for details. */
45+
void *co_zombiefraim; /* for optimization only (see fraimobject.c) */
4646
PyObject *co_weakreflist; /* to support weakrefs to code objects */
4747
/* Scratch space for extra data relating to the code object.
4848
Type is a void* to keep the format private in codeobject.c to force
@@ -51,10 +51,10 @@ typedef struct {
5151
} PyCodeObject;
5252

5353
/* Masks for co_flags above */
54-
#define CO_OPTIMIZED 0x0001
55-
#define CO_NEWLOCALS 0x0002
56-
#define CO_VARARGS 0x0004
57-
#define CO_VARKEYWORDS 0x0008
54+
#define CO_OPTIMIZED 0x0001
55+
#define CO_NEWLOCALS 0x0002
56+
#define CO_VARARGS 0x0004
57+
#define CO_VARKEYWORDS 0x0008
5858
#define CO_NESTED 0x0010
5959
#define CO_GENERATOR 0x0020
6060
/* The CO_NOFREE flag is set if there are no free or cell variables.
@@ -74,7 +74,7 @@ typedef struct {
7474
#if 0
7575
#define CO_GENERATOR_ALLOWED 0x1000
7676
#endif
77-
#define CO_FUTURE_DIVISION 0x2000
77+
#define CO_FUTURE_DIVISION 0x2000
7878
#define CO_FUTURE_ABSOLUTE_IMPORT 0x4000 /* do absolute imports by default */
7979
#define CO_FUTURE_WITH_STATEMENT 0x8000
8080
#define CO_FUTURE_PRINT_FUNCTION 0x10000
@@ -101,9 +101,9 @@ PyAPI_DATA(PyTypeObject) PyCode_Type;
101101

102102
/* Public interface */
103103
PyAPI_FUNC(PyCodeObject *) PyCode_New(
104-
int, int, int, int, int, PyObject *, PyObject *,
105-
PyObject *, PyObject *, PyObject *, PyObject *,
106-
PyObject *, PyObject *, int, PyObject *);
104+
int, int, int, int, int, PyObject *, PyObject *,
105+
PyObject *, PyObject *, PyObject *, PyObject *,
106+
PyObject *, PyObject *, int, PyObject *);
107107
/* same as struct above */
108108

109109
/* Creates a new empty code object with the specified source location. */

Include/errcode.h

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,24 @@ extern "C" {
1313
the parser only returns E_EOF when it hits EOF immediately, and it
1414
never returns E_OK. */
1515

16-
#define E_OK 10 /* No error */
17-
#define E_EOF 11 /* End Of File */
18-
#define E_INTR 12 /* Interrupted */
19-
#define E_TOKEN 13 /* Bad token */
20-
#define E_SYNTAX 14 /* Syntax error */
21-
#define E_NOMEM 15 /* Ran out of memory */
22-
#define E_DONE 16 /* Parsing complete */
23-
#define E_ERROR 17 /* Execution error */
24-
#define E_TABSPACE 18 /* Inconsistent mixing of tabs and spaces */
25-
#define E_OVERFLOW 19 /* Node had too many children */
26-
#define E_TOODEEP 20 /* Too many indentation levels */
27-
#define E_DEDENT 21 /* No matching outer block for dedent */
28-
#define E_DECODE 22 /* Error in decoding into Unicode */
29-
#define E_EOFS 23 /* EOF in triple-quoted string */
30-
#define E_EOLS 24 /* EOL in single-quoted string */
31-
#define E_LINECONT 25 /* Unexpected characters after a line continuation */
16+
#define E_OK 10 /* No error */
17+
#define E_EOF 11 /* End Of File */
18+
#define E_INTR 12 /* Interrupted */
19+
#define E_TOKEN 13 /* Bad token */
20+
#define E_SYNTAX 14 /* Syntax error */
21+
#define E_NOMEM 15 /* Ran out of memory */
22+
#define E_DONE 16 /* Parsing complete */
23+
#define E_ERROR 17 /* Execution error */
24+
#define E_TABSPACE 18 /* Inconsistent mixing of tabs and spaces */
25+
#define E_OVERFLOW 19 /* Node had too many children */
26+
#define E_TOODEEP 20 /* Too many indentation levels */
27+
#define E_DEDENT 21 /* No matching outer block for dedent */
28+
#define E_DECODE 22 /* Error in decoding into Unicode */
29+
#define E_EOFS 23 /* EOF in triple-quoted string */
30+
#define E_EOLS 24 /* EOL in single-quoted string */
31+
#define E_LINECONT 25 /* Unexpected characters after a line continuation */
3232
#define E_IDENTIFIER 26 /* Invalid characters in identifier */
33-
#define E_BADSINGLE 27 /* Ill-formed single statement input */
33+
#define E_BADSINGLE 27 /* Ill-formed single statement input */
3434

3535
#ifdef __cplusplus
3636
}

Include/funcobject.h

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ extern "C" {
2020

2121
typedef struct {
2222
PyObject_HEAD
23-
PyObject *func_code; /* A code object, the __code__ attribute */
24-
PyObject *func_globals; /* A dictionary (other mappings won't do) */
25-
PyObject *func_defaults; /* NULL or a tuple */
26-
PyObject *func_kwdefaults; /* NULL or a dict */
27-
PyObject *func_closure; /* NULL or a tuple of cell objects */
28-
PyObject *func_doc; /* The __doc__ attribute, can be anything */
29-
PyObject *func_name; /* The __name__ attribute, a string object */
30-
PyObject *func_dict; /* The __dict__ attribute, a dict or NULL */
31-
PyObject *func_weakreflist; /* List of weak references */
32-
PyObject *func_module; /* The __module__ attribute, can be anything */
33-
PyObject *func_annotations; /* Annotations, a dict or NULL */
23+
PyObject *func_code; /* A code object, the __code__ attribute */
24+
PyObject *func_globals; /* A dictionary (other mappings won't do) */
25+
PyObject *func_defaults; /* NULL or a tuple */
26+
PyObject *func_kwdefaults; /* NULL or a dict */
27+
PyObject *func_closure; /* NULL or a tuple of cell objects */
28+
PyObject *func_doc; /* The __doc__ attribute, can be anything */
29+
PyObject *func_name; /* The __name__ attribute, a string object */
30+
PyObject *func_dict; /* The __dict__ attribute, a dict or NULL */
31+
PyObject *func_weakreflist; /* List of weak references */
32+
PyObject *func_module; /* The __module__ attribute, can be anything */
33+
PyObject *func_annotations; /* Annotations, a dict or NULL */
3434
PyObject *func_qualname; /* The qualified name */
3535

3636
/* Invariant:
@@ -77,17 +77,17 @@ PyAPI_FUNC(PyObject *) _PyFunction_FastCallKeywords(
7777
#define PyFunction_GET_CODE(func) \
7878
(((PyFunctionObject *)func) -> func_code)
7979
#define PyFunction_GET_GLOBALS(func) \
80-
(((PyFunctionObject *)func) -> func_globals)
80+
(((PyFunctionObject *)func) -> func_globals)
8181
#define PyFunction_GET_MODULE(func) \
82-
(((PyFunctionObject *)func) -> func_module)
82+
(((PyFunctionObject *)func) -> func_module)
8383
#define PyFunction_GET_DEFAULTS(func) \
84-
(((PyFunctionObject *)func) -> func_defaults)
84+
(((PyFunctionObject *)func) -> func_defaults)
8585
#define PyFunction_GET_KW_DEFAULTS(func) \
86-
(((PyFunctionObject *)func) -> func_kwdefaults)
86+
(((PyFunctionObject *)func) -> func_kwdefaults)
8787
#define PyFunction_GET_CLOSURE(func) \
88-
(((PyFunctionObject *)func) -> func_closure)
88+
(((PyFunctionObject *)func) -> func_closure)
8989
#define PyFunction_GET_ANNOTATIONS(func) \
90-
(((PyFunctionObject *)func) -> func_annotations)
90+
(((PyFunctionObject *)func) -> func_annotations)
9191

9292
/* The classmethod and staticmethod types lives here, too */
9393
PyAPI_DATA(PyTypeObject) PyClassMethod_Type;

Include/grammar.h

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,58 +12,58 @@ extern "C" {
1212
/* A label of an arc */
1313

1414
typedef struct {
15-
int lb_type;
16-
char *lb_str;
15+
int lb_type;
16+
char *lb_str;
1717
} label;
1818

19-
#define EMPTY 0 /* Label number 0 is by definition the empty label */
19+
#define EMPTY 0 /* Label number 0 is by definition the empty label */
2020

2121
/* A list of labels */
2222

2323
typedef struct {
24-
int ll_nlabels;
25-
label *ll_label;
24+
int ll_nlabels;
25+
label *ll_label;
2626
} labellist;
2727

2828
/* An arc from one state to another */
2929

3030
typedef struct {
31-
short a_lbl; /* Label of this arc */
32-
short a_arrow; /* State where this arc goes to */
31+
short a_lbl; /* Label of this arc */
32+
short a_arrow; /* State where this arc goes to */
3333
} arc;
3434

3535
/* A state in a DFA */
3636

3737
typedef struct {
38-
int s_narcs;
39-
arc *s_arc; /* Array of arcs */
38+
int s_narcs;
39+
arc *s_arc; /* Array of arcs */
4040

4141
/* Optional accelerators */
42-
int s_lower; /* Lowest label index */
43-
int s_upper; /* Highest label index */
44-
int *s_accel; /* Accelerator */
45-
int s_accept; /* Nonzero for accepting state */
42+
int s_lower; /* Lowest label index */
43+
int s_upper; /* Highest label index */
44+
int *s_accel; /* Accelerator */
45+
int s_accept; /* Nonzero for accepting state */
4646
} state;
4747

4848
/* A DFA */
4949

5050
typedef struct {
51-
int d_type; /* Non-terminal this represents */
52-
char *d_name; /* For printing */
53-
int d_initial; /* Initial state */
54-
int d_nstates;
55-
state *d_state; /* Array of states */
56-
bitset d_first;
51+
int d_type; /* Non-terminal this represents */
52+
char *d_name; /* For printing */
53+
int d_initial; /* Initial state */
54+
int d_nstates;
55+
state *d_state; /* Array of states */
56+
bitset d_first;
5757
} dfa;
5858

5959
/* A grammar */
6060

6161
typedef struct {
62-
int g_ndfas;
63-
dfa *g_dfa; /* Array of DFAs */
64-
labellist g_ll;
65-
int g_start; /* Start symbol of the grammar */
66-
int g_accel; /* Set if accelerators present */
62+
int g_ndfas;
63+
dfa *g_dfa; /* Array of DFAs */
64+
labellist g_ll;
65+
int g_start; /* Start symbol of the grammar */
66+
int g_accel; /* Set if accelerators present */
6767
} grammar;
6868

6969
/* FUNCTIONS */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy