diff -r 9d0f4da4d531 Include/bitset.h --- a/Include/bitset.h Sat Sep 17 01:30:48 2016 +0300 +++ b/Include/bitset.h Fri Sep 16 22:37:46 2016 -0300 @@ -7,7 +7,7 @@ /* Bitset interface */ -#define BYTE char +#define BYTE char typedef BYTE *bitset; @@ -18,13 +18,13 @@ int samebitset(bitset bs1, bitset bs2, int nbits); void mergebitset(bitset bs1, bitset bs2, int nbits); -#define BITSPERBYTE (8*sizeof(BYTE)) -#define NBYTES(nbits) (((nbits) + BITSPERBYTE - 1) / BITSPERBYTE) +#define BITSPERBYTE (8*sizeof(BYTE)) +#define NBYTES(nbits) (((nbits) + BITSPERBYTE - 1) / BITSPERBYTE) -#define BIT2BYTE(ibit) ((ibit) / BITSPERBYTE) -#define BIT2SHIFT(ibit) ((ibit) % BITSPERBYTE) -#define BIT2MASK(ibit) (1 << BIT2SHIFT(ibit)) -#define BYTE2BIT(ibyte) ((ibyte) * BITSPERBYTE) +#define BIT2BYTE(ibit) ((ibit) / BITSPERBYTE) +#define BIT2SHIFT(ibit) ((ibit) % BITSPERBYTE) +#define BIT2MASK(ibit) (1 << BIT2SHIFT(ibit)) +#define BYTE2BIT(ibyte) ((ibyte) * BITSPERBYTE) #ifdef __cplusplus } diff -r 9d0f4da4d531 Include/bytesobject.h --- a/Include/bytesobject.h Sat Sep 17 01:30:48 2016 +0300 +++ b/Include/bytesobject.h Fri Sep 16 22:37:46 2016 -0300 @@ -45,16 +45,16 @@ PyAPI_DATA(PyTypeObject) PyBytesIter_Type; #define PyBytes_Check(op) \ - PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_BYTES_SUBCLASS) + PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_BYTES_SUBCLASS) #define PyBytes_CheckExact(op) (Py_TYPE(op) == &PyBytes_Type) PyAPI_FUNC(PyObject *) PyBytes_FromStringAndSize(const char *, Py_ssize_t); PyAPI_FUNC(PyObject *) PyBytes_FromString(const char *); PyAPI_FUNC(PyObject *) PyBytes_FromObject(PyObject *); PyAPI_FUNC(PyObject *) PyBytes_FromFormatV(const char*, va_list) - Py_GCC_ATTRIBUTE((format(printf, 1, 0))); + Py_GCC_ATTRIBUTE((format(printf, 1, 0))); PyAPI_FUNC(PyObject *) PyBytes_FromFormat(const char*, ...) - Py_GCC_ATTRIBUTE((format(printf, 1, 2))); + Py_GCC_ATTRIBUTE((format(printf, 1, 2))); PyAPI_FUNC(Py_ssize_t) PyBytes_Size(PyObject *); PyAPI_FUNC(char *) PyBytes_AsString(PyObject *); PyAPI_FUNC(PyObject *) PyBytes_Repr(PyObject *, int); @@ -72,8 +72,8 @@ int use_bytearray); #endif PyAPI_FUNC(PyObject *) PyBytes_DecodeEscape(const char *, Py_ssize_t, - const char *, Py_ssize_t, - const char *); + const char *, Py_ssize_t, + const char *); /* Macro, trading safety for speed */ #ifndef Py_LIMITED_API @@ -125,10 +125,10 @@ /* Flags used by string formatting */ #define F_LJUST (1<<0) -#define F_SIGN (1<<1) +#define F_SIGN (1<<1) #define F_BLANK (1<<2) -#define F_ALT (1<<3) -#define F_ZERO (1<<4) +#define F_ALT (1<<3) +#define F_ZERO (1<<4) #ifndef Py_LIMITED_API /* The _PyBytesWriter structure is big: it contains an embedded "stack buffer". diff -r 9d0f4da4d531 Include/cellobject.h --- a/Include/cellobject.h Sat Sep 17 01:30:48 2016 +0300 +++ b/Include/cellobject.h Fri Sep 16 22:37:46 2016 -0300 @@ -7,8 +7,8 @@ #endif typedef struct { - PyObject_HEAD - PyObject *ob_ref; /* Content of the cell or NULL when empty */ + PyObject_HEAD + PyObject *ob_ref; /* Content of the cell or NULL when empty */ } PyCellObject; PyAPI_DATA(PyTypeObject) PyCell_Type; diff -r 9d0f4da4d531 Include/classobject.h --- a/Include/classobject.h Sat Sep 17 01:30:48 2016 +0300 +++ b/Include/classobject.h Fri Sep 16 22:37:46 2016 -0300 @@ -30,13 +30,13 @@ #define PyMethod_GET_FUNCTION(meth) \ (((PyMethodObject *)meth) -> im_func) #define PyMethod_GET_SELF(meth) \ - (((PyMethodObject *)meth) -> im_self) + (((PyMethodObject *)meth) -> im_self) PyAPI_FUNC(int) PyMethod_ClearFreeList(void); typedef struct { - PyObject_HEAD - PyObject *func; + PyObject_HEAD + PyObject *func; } PyInstanceMethodObject; PyAPI_DATA(PyTypeObject) PyInstanceMethod_Type; diff -r 9d0f4da4d531 Include/code.h --- a/Include/code.h Sat Sep 17 01:30:48 2016 +0300 +++ b/Include/code.h Fri Sep 16 22:37:46 2016 -0300 @@ -20,17 +20,17 @@ /* Bytecode object */ typedef struct { PyObject_HEAD - int co_argcount; /* #arguments, except *args */ - int co_kwonlyargcount; /* #keyword only arguments */ - int co_nlocals; /* #local variables */ - int co_stacksize; /* #entries needed for evaluation stack */ - int co_flags; /* CO_..., see below */ - int co_firstlineno; /* first source line number */ - PyObject *co_code; /* instruction opcodes */ - PyObject *co_consts; /* list (constants used) */ - PyObject *co_names; /* list of strings (names used) */ - PyObject *co_varnames; /* tuple of strings (local variable names) */ - PyObject *co_freevars; /* tuple of strings (free variable names) */ + int co_argcount; /* #arguments, except *args */ + int co_kwonlyargcount; /* #keyword only arguments */ + int co_nlocals; /* #local variables */ + int co_stacksize; /* #entries needed for evaluation stack */ + int co_flags; /* CO_..., see below */ + int co_firstlineno; /* first source line number */ + PyObject *co_code; /* instruction opcodes */ + PyObject *co_consts; /* list (constants used) */ + PyObject *co_names; /* list of strings (names used) */ + PyObject *co_varnames; /* tuple of strings (local variable names) */ + PyObject *co_freevars; /* tuple of strings (free variable names) */ PyObject *co_cellvars; /* tuple of strings (cell variable names) */ /* The rest aren't used in either hash or comparisons, except for co_name (used in both) and co_firstlineno (used only in @@ -39,11 +39,11 @@ would collapse identical functions/lambdas defined on different lines. */ unsigned char *co_cell2arg; /* Maps cell vars which are arguments. */ - PyObject *co_filename; /* unicode (where it was loaded from) */ - PyObject *co_name; /* unicode (name, for reference) */ - PyObject *co_lnotab; /* string (encoding addr<->lineno mapping) See - Objects/lnotab_notes.txt for details. */ - void *co_zombieframe; /* for optimization only (see frameobject.c) */ + PyObject *co_filename; /* unicode (where it was loaded from) */ + PyObject *co_name; /* unicode (name, for reference) */ + PyObject *co_lnotab; /* string (encoding addr<->lineno mapping) See + Objects/lnotab_notes.txt for details. */ + void *co_zombieframe; /* for optimization only (see frameobject.c) */ PyObject *co_weakreflist; /* to support weakrefs to code objects */ /* Scratch space for extra data relating to the code object.__icc_nan Type is a void* to keep the format private in codeobject.c to force @@ -52,10 +52,10 @@ } PyCodeObject; /* Masks for co_flags above */ -#define CO_OPTIMIZED 0x0001 -#define CO_NEWLOCALS 0x0002 -#define CO_VARARGS 0x0004 -#define CO_VARKEYWORDS 0x0008 +#define CO_OPTIMIZED 0x0001 +#define CO_NEWLOCALS 0x0002 +#define CO_VARARGS 0x0004 +#define CO_VARKEYWORDS 0x0008 #define CO_NESTED 0x0010 #define CO_GENERATOR 0x0020 /* The CO_NOFREE flag is set if there are no free or cell variables. @@ -75,10 +75,10 @@ #if 0 #define CO_GENERATOR_ALLOWED 0x1000 #endif -#define CO_FUTURE_DIVISION 0x2000 -#define CO_FUTURE_ABSOLUTE_IMPORT 0x4000 /* do absolute imports by default */ -#define CO_FUTURE_WITH_STATEMENT 0x8000 -#define CO_FUTURE_PRINT_FUNCTION 0x10000 +#define CO_FUTURE_DIVISION 0x2000 +#define CO_FUTURE_ABSOLUTE_IMPORT 0x4000 /* do absolute imports by default */ +#define CO_FUTURE_WITH_STATEMENT 0x8000 +#define CO_FUTURE_PRINT_FUNCTION 0x10000 #define CO_FUTURE_UNICODE_LITERALS 0x20000 #define CO_FUTURE_BARRY_AS_BDFL 0x40000 @@ -103,10 +103,10 @@ /* Public interface */ PyAPI_FUNC(PyCodeObject *) PyCode_New( - int, int, int, int, int, PyObject *, PyObject *, - PyObject *, PyObject *, PyObject *, PyObject *, - PyObject *, PyObject *, int, PyObject *); - /* same as struct above */ + int, int, int, int, int, PyObject *, PyObject *, + PyObject *, PyObject *, PyObject *, PyObject *, + PyObject *, PyObject *, int, PyObject *); + /* same as struct above */ /* Creates a new empty code object with the specified source location. */ PyAPI_FUNC(PyCodeObject *) diff -r 9d0f4da4d531 Include/errcode.h --- a/Include/errcode.h Sat Sep 17 01:30:48 2016 +0300 +++ b/Include/errcode.h Fri Sep 16 22:37:46 2016 -0300 @@ -13,24 +13,24 @@ the parser only returns E_EOF when it hits EOF immediately, and it never returns E_OK. */ -#define E_OK 10 /* No error */ -#define E_EOF 11 /* End Of File */ -#define E_INTR 12 /* Interrupted */ -#define E_TOKEN 13 /* Bad token */ -#define E_SYNTAX 14 /* Syntax error */ -#define E_NOMEM 15 /* Ran out of memory */ -#define E_DONE 16 /* Parsing complete */ -#define E_ERROR 17 /* Execution error */ -#define E_TABSPACE 18 /* Inconsistent mixing of tabs and spaces */ -#define E_OVERFLOW 19 /* Node had too many children */ -#define E_TOODEEP 20 /* Too many indentation levels */ -#define E_DEDENT 21 /* No matching outer block for dedent */ -#define E_DECODE 22 /* Error in decoding into Unicode */ -#define E_EOFS 23 /* EOF in triple-quoted string */ -#define E_EOLS 24 /* EOL in single-quoted string */ -#define E_LINECONT 25 /* Unexpected characters after a line continuation */ -#define E_IDENTIFIER 26 /* Invalid characters in identifier */ -#define E_BADSINGLE 27 /* Ill-formed single statement input */ +#define E_OK 10 /* No error */ +#define E_EOF 11 /* End Of File */ +#define E_INTR 12 /* Interrupted */ +#define E_TOKEN 13 /* Bad token */ +#define E_SYNTAX 14 /* Syntax error */ +#define E_NOMEM 15 /* Ran out of memory */ +#define E_DONE 16 /* Parsing complete */ +#define E_ERROR 17 /* Execution error */ +#define E_TABSPACE 18 /* Inconsistent mixing of tabs and spaces */ +#define E_OVERFLOW 19 /* Node had too many children */ +#define E_TOODEEP 20 /* Too many indentation levels */ +#define E_DEDENT 21 /* No matching outer block for dedent */ +#define E_DECODE 22 /* Error in decoding into Unicode */ +#define E_EOFS 23 /* EOF in triple-quoted string */ +#define E_EOLS 24 /* EOL in single-quoted string */ +#define E_LINECONT 25 /* Unexpected characters after a line continuation */ +#define E_IDENTIFIER 26 /* Invalid characters in identifier */ +#define E_BADSINGLE 27 /* Ill-formed single statement input */ #ifdef __cplusplus } diff -r 9d0f4da4d531 Include/eval.h --- a/Include/eval.h Sat Sep 17 01:30:48 2016 +0300 +++ b/Include/eval.h Fri Sep 16 22:37:46 2016 -0300 @@ -10,12 +10,12 @@ PyAPI_FUNC(PyObject *) PyEval_EvalCode(PyObject *, PyObject *, PyObject *); PyAPI_FUNC(PyObject *) PyEval_EvalCodeEx(PyObject *co, - PyObject *globals, - PyObject *locals, - PyObject **args, int argc, - PyObject **kwds, int kwdc, - PyObject **defs, int defc, - PyObject *kwdefs, PyObject *closure); + PyObject *globals, + PyObject *locals, + PyObject **args, int argc, + PyObject **kwds, int kwdc, + PyObject **defs, int defc, + PyObject *kwdefs, PyObject *closure); #ifndef Py_LIMITED_API PyAPI_FUNC(PyObject *) _PyEval_CallTracing(PyObject *func, PyObject *args); diff -r 9d0f4da4d531 Include/funcobject.h --- a/Include/funcobject.h Sat Sep 17 01:30:48 2016 +0300 +++ b/Include/funcobject.h Fri Sep 16 22:37:46 2016 -0300 @@ -20,17 +20,17 @@ typedef struct { PyObject_HEAD - PyObject *func_code; /* A code object, the __code__ attribute */ - PyObject *func_globals; /* A dictionary (other mappings won't do) */ - PyObject *func_defaults; /* NULL or a tuple */ - PyObject *func_kwdefaults; /* NULL or a dict */ - PyObject *func_closure; /* NULL or a tuple of cell objects */ - PyObject *func_doc; /* The __doc__ attribute, can be anything */ - PyObject *func_name; /* The __name__ attribute, a string object */ - PyObject *func_dict; /* The __dict__ attribute, a dict or NULL */ - PyObject *func_weakreflist; /* List of weak references */ - PyObject *func_module; /* The __module__ attribute, can be anything */ - PyObject *func_annotations; /* Annotations, a dict or NULL */ + PyObject *func_code; /* A code object, the __code__ attribute */ + PyObject *func_globals; /* A dictionary (other mappings won't do) */ + PyObject *func_defaults; /* NULL or a tuple */ + PyObject *func_kwdefaults; /* NULL or a dict */ + PyObject *func_closure; /* NULL or a tuple of cell objects */ + PyObject *func_doc; /* The __doc__ attribute, can be anything */ + PyObject *func_name; /* The __name__ attribute, a string object */ + PyObject *func_dict; /* The __dict__ attribute, a dict or NULL */ + PyObject *func_weakreflist; /* List of weak references */ + PyObject *func_module; /* The __module__ attribute, can be anything */ + PyObject *func_annotations; /* Annotations, a dict or NULL */ PyObject *func_qualname; /* The qualified name */ /* Invariant: @@ -77,17 +77,17 @@ #define PyFunction_GET_CODE(func) \ (((PyFunctionObject *)func) -> func_code) #define PyFunction_GET_GLOBALS(func) \ - (((PyFunctionObject *)func) -> func_globals) + (((PyFunctionObject *)func) -> func_globals) #define PyFunction_GET_MODULE(func) \ - (((PyFunctionObject *)func) -> func_module) + (((PyFunctionObject *)func) -> func_module) #define PyFunction_GET_DEFAULTS(func) \ - (((PyFunctionObject *)func) -> func_defaults) + (((PyFunctionObject *)func) -> func_defaults) #define PyFunction_GET_KW_DEFAULTS(func) \ - (((PyFunctionObject *)func) -> func_kwdefaults) + (((PyFunctionObject *)func) -> func_kwdefaults) #define PyFunction_GET_CLOSURE(func) \ - (((PyFunctionObject *)func) -> func_closure) + (((PyFunctionObject *)func) -> func_closure) #define PyFunction_GET_ANNOTATIONS(func) \ - (((PyFunctionObject *)func) -> func_annotations) + (((PyFunctionObject *)func) -> func_annotations) /* The classmethod and staticmethod types lives here, too */ PyAPI_DATA(PyTypeObject) PyClassMethod_Type; diff -r 9d0f4da4d531 Include/grammar.h --- a/Include/grammar.h Sat Sep 17 01:30:48 2016 +0300 +++ b/Include/grammar.h Fri Sep 16 22:37:46 2016 -0300 @@ -12,58 +12,58 @@ /* A label of an arc */ typedef struct { - int lb_type; - char *lb_str; + int lb_type; + char *lb_str; } label; -#define EMPTY 0 /* Label number 0 is by definition the empty label */ +#define EMPTY 0 /* Label number 0 is by definition the empty label */ /* A list of labels */ typedef struct { - int ll_nlabels; - label *ll_label; + int ll_nlabels; + label *ll_label; } labellist; /* An arc from one state to another */ typedef struct { - short a_lbl; /* Label of this arc */ - short a_arrow; /* State where this arc goes to */ + short a_lbl; /* Label of this arc */ + short a_arrow; /* State where this arc goes to */ } arc; /* A state in a DFA */ typedef struct { - int s_narcs; - arc *s_arc; /* Array of arcs */ + int s_narcs; + arc *s_arc; /* Array of arcs */ /* Optional accelerators */ - int s_lower; /* Lowest label index */ - int s_upper; /* Highest label index */ - int *s_accel; /* Accelerator */ - int s_accept; /* Nonzero for accepting state */ + int s_lower; /* Lowest label index */ + int s_upper; /* Highest label index */ + int *s_accel; /* Accelerator */ + int s_accept; /* Nonzero for accepting state */ } state; /* A DFA */ typedef struct { - int d_type; /* Non-terminal this represents */ - char *d_name; /* For printing */ - int d_initial; /* Initial state */ - int d_nstates; - state *d_state; /* Array of states */ - bitset d_first; + int d_type; /* Non-terminal this represents */ + char *d_name; /* For printing */ + int d_initial; /* Initial state */ + int d_nstates; + state *d_state; /* Array of states */ + bitset d_first; } dfa; /* A grammar */ typedef struct { - int g_ndfas; - dfa *g_dfa; /* Array of DFAs */ - labellist g_ll; - int g_start; /* Start symbol of the grammar */ - int g_accel; /* Set if accelerators present */ + int g_ndfas; + dfa *g_dfa; /* Array of DFAs */ + labellist g_ll; + int g_start; /* Start symbol of the grammar */ + int g_accel; /* Set if accelerators present */ } grammar; /* FUNCTIONS */ diff -r 9d0f4da4d531 Include/longintrepr.h --- a/Include/longintrepr.h Sat Sep 17 01:30:48 2016 +0300 +++ b/Include/longintrepr.h Fri Sep 16 22:37:46 2016 -0300 @@ -46,22 +46,22 @@ typedef int32_t sdigit; /* signed variant of digit */ typedef uint64_t twodigits; typedef int64_t stwodigits; /* signed variant of twodigits */ -#define PyLong_SHIFT 30 -#define _PyLong_DECIMAL_SHIFT 9 /* max(e such that 10**e fits in a digit) */ -#define _PyLong_DECIMAL_BASE ((digit)1000000000) /* 10 ** DECIMAL_SHIFT */ +#define PyLong_SHIFT 30 +#define _PyLong_DECIMAL_SHIFT 9 /* max(e such that 10**e fits in a digit) */ +#define _PyLong_DECIMAL_BASE ((digit)1000000000) /* 10 ** DECIMAL_SHIFT */ #elif PYLONG_BITS_IN_DIGIT == 15 typedef unsigned short digit; typedef short sdigit; /* signed variant of digit */ typedef unsigned long twodigits; typedef long stwodigits; /* signed variant of twodigits */ -#define PyLong_SHIFT 15 -#define _PyLong_DECIMAL_SHIFT 4 /* max(e such that 10**e fits in a digit) */ -#define _PyLong_DECIMAL_BASE ((digit)10000) /* 10 ** DECIMAL_SHIFT */ +#define PyLong_SHIFT 15 +#define _PyLong_DECIMAL_SHIFT 4 /* max(e such that 10**e fits in a digit) */ +#define _PyLong_DECIMAL_BASE ((digit)10000) /* 10 ** DECIMAL_SHIFT */ #else #error "PYLONG_BITS_IN_DIGIT should be 15 or 30" #endif -#define PyLong_BASE ((digit)1 << PyLong_SHIFT) -#define PyLong_MASK ((digit)(PyLong_BASE - 1)) +#define PyLong_BASE (digit)1 << PyLong_SHIFT) +#define PyLong_MASK ((digit)(PyLong_BASE - 1)) #if PyLong_SHIFT % 5 != 0 #error "longobject.c requires that PyLong_SHIFT be divisible by 5" @@ -69,12 +69,12 @@ /* Long integer representation. The absolute value of a number is equal to - SUM(for i=0 through abs(ob_size)-1) ob_digit[i] * 2**(SHIFT*i) + SUM(for i=0 through abs(ob_size)-1) ob_digit[i] * 2**(SHIFT*i) Negative numbers are represented with ob_size < 0; zero is represented by ob_size == 0. In a normalized number, ob_digit[abs(ob_size)-1] (the most significant digit) is never zero. Also, in all cases, for all valid i, - 0 <= ob_digit[i] <= MASK. + 0 <= ob_digit[i] <= MASK. The allocation function takes care of allocating extra memory so that ob_digit[0] ... ob_digit[abs(ob_size)-1] are actually available. @@ -83,8 +83,8 @@ */ struct _longobject { - PyObject_VAR_HEAD - digit ob_digit[1]; + PyObject_VAR_HEAD + digit ob_digit[1]; }; PyAPI_FUNC(PyLongObject *) _PyLong_New(Py_ssize_t); diff -r 9d0f4da4d531 Include/node.h --- a/Include/node.h Sat Sep 17 01:30:48 2016 +0300 +++ b/Include/node.h Fri Sep 16 22:37:46 2016 -0300 @@ -8,12 +8,12 @@ #endif typedef struct _node { - short n_type; - char *n_str; - int n_lineno; - int n_col_offset; - int n_nchildren; - struct _node *n_child; + short n_type; + char *n_str; + int n_lineno; + int n_col_offset; + int n_nchildren; + struct _node *n_child; } node; PyAPI_FUNC(node *) PyNode_New(int type); @@ -25,13 +25,13 @@ #endif /* Node access functions */ -#define NCH(n) ((n)->n_nchildren) +#define NCH(n) ((n)->n_nchildren) -#define CHILD(n, i) (&(n)->n_child[i]) -#define RCHILD(n, i) (CHILD(n, NCH(n) + i)) -#define TYPE(n) ((n)->n_type) -#define STR(n) ((n)->n_str) -#define LINENO(n) ((n)->n_lineno) +#define CHILD(n, i) (&(n)->n_child[i]) +#define RCHILD(n, i) (CHILD(n, NCH(n) + i)) +#define TYPE(n) ((n)->n_type) +#define STR(n) ((n)->n_str) +#define LINENO(n) ((n)->n_lineno) /* Assert that the type of a node is what we expect */ #define REQ(n, type) assert(TYPE(n) == (type)) diff -r 9d0f4da4d531 Include/parsetok.h --- a/Include/parsetok.h Sat Sep 17 01:30:48 2016 +0300 +++ b/Include/parsetok.h Fri Sep 16 22:37:46 2016 -0300 @@ -21,15 +21,15 @@ } perrdetail; #if 0 -#define PyPARSE_YIELD_IS_KEYWORD 0x0001 +#define PyPARSE_YIELD_IS_KEYWORD 0x0001 #endif -#define PyPARSE_DONT_IMPLY_DEDENT 0x0002 +#define PyPARSE_DONT_IMPLY_DEDENT 0x0002 #if 0 -#define PyPARSE_WITH_IS_KEYWORD 0x0003 -#define PyPARSE_PRINT_IS_FUNCTION 0x0004 -#define PyPARSE_UNICODE_LITERALS 0x0008 +#define PyPARSE_WITH_IS_KEYWORD 0x0003 +#define PyPARSE_PRINT_IS_FUNCTION 0x0004 +#define PyPARSE_UNICODE_LITERALS 0x0008 #endif #define PyPARSE_IGNORE_COOKIE 0x0010 diff -r 9d0f4da4d531 Include/patchlevel.h --- a/Include/patchlevel.h Sat Sep 17 01:30:48 2016 +0300 +++ b/Include/patchlevel.h Fri Sep 16 22:37:46 2016 -0300 @@ -8,28 +8,28 @@ */ /* Values for PY_RELEASE_LEVEL */ -#define PY_RELEASE_LEVEL_ALPHA 0xA -#define PY_RELEASE_LEVEL_BETA 0xB -#define PY_RELEASE_LEVEL_GAMMA 0xC /* For release candidates */ -#define PY_RELEASE_LEVEL_FINAL 0xF /* Serial should be 0 here */ - /* Higher for patch releases */ +#define PY_RELEASE_LEVEL_ALPHA 0xA +#define PY_RELEASE_LEVEL_BETA 0xB +#define PY_RELEASE_LEVEL_GAMMA 0xC /* For release candidates */ +#define PY_RELEASE_LEVEL_FINAL 0xF /* Serial should be 0 here */ + /* Higher for patch releases */ /* Version parsed out into numeric values */ /*--start constants--*/ -#define PY_MAJOR_VERSION 3 -#define PY_MINOR_VERSION 7 -#define PY_MICRO_VERSION 0 -#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_ALPHA -#define PY_RELEASE_SERIAL 0 +#define PY_MAJOR_VERSION 3 +#define PY_MINOR_VERSION 7 +#define PY_MICRO_VERSION 0 +#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_ALPHA +#define PY_RELEASE_SERIAL 0 /* Version as a string */ -#define PY_VERSION "3.7.0a0" +#define PY_VERSION "3.7.0a0" /*--end constants--*/ /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. Use this for numeric comparisons, e.g. #if PY_VERSION_HEX >= ... */ #define PY_VERSION_HEX ((PY_MAJOR_VERSION << 24) | \ - (PY_MINOR_VERSION << 16) | \ - (PY_MICRO_VERSION << 8) | \ - (PY_RELEASE_LEVEL << 4) | \ - (PY_RELEASE_SERIAL << 0)) + (PY_MINOR_VERSION << 16) | \ + (PY_MICRO_VERSION << 8) | \ + (PY_RELEASE_LEVEL << 4) | \ + (PY_RELEASE_SERIAL << 0)) diff -r 9d0f4da4d531 Include/pgenheaders.h --- a/Include/pgenheaders.h Sat Sep 17 01:30:48 2016 +0300 +++ b/Include/pgenheaders.h Fri Sep 16 22:37:46 2016 -0300 @@ -10,9 +10,9 @@ #include "Python.h" PyAPI_FUNC(void) PySys_WriteStdout(const char *format, ...) - Py_GCC_ATTRIBUTE((format(printf, 1, 2))); + Py_GCC_ATTRIBUTE((format(printf, 1, 2))); PyAPI_FUNC(void) PySys_WriteStderr(const char *format, ...) - Py_GCC_ATTRIBUTE((format(printf, 1, 2))); + Py_GCC_ATTRIBUTE((format(printf, 1, 2))); #define addarc _Py_addarc #define addbit _Py_addbit diff -r 9d0f4da4d531 Include/py_curses.h --- a/Include/py_curses.h Sat Sep 17 01:30:48 2016 +0300 +++ b/Include/py_curses.h Fri Sep 16 22:37:46 2016 -0300 @@ -7,7 +7,7 @@ ** On Mac OS X 10.2 [n]curses.h and stdlib.h use different guards ** against multiple definition of wchar_t. */ -#ifdef _BSD_WCHAR_T_DEFINED_ +#ifdef _BSD_WCHAR_T_DEFINED_ #define _WCHAR_T #endif @@ -22,7 +22,7 @@ ** On FreeBSD, [n]curses.h and stdlib.h/wchar.h use different guards ** against multiple definition of wchar_t and wint_t. */ -#ifdef _XOPEN_SOURCE_EXTENDED +#ifdef _XOPEN_SOURCE_EXTENDED #ifndef __FreeBSD_version #include #endif @@ -74,12 +74,12 @@ /* Type declarations */ typedef struct { - PyObject_HEAD - WINDOW *win; - char *encoding; + PyObject_HEAD + WINDOW *win; + char *encoding; } PyCursesWindowObject; -#define PyCursesWindow_Check(v) (Py_TYPE(v) == &PyCursesWindow_Type) +#define PyCursesWindow_Check(v) (Py_TYPE(v) == &PyCursesWindow_Type) #define PyCurses_CAPSULE_NAME "_curses._C_API" diff -r 9d0f4da4d531 Include/pyatomic.h --- a/Include/pyatomic.h Sat Sep 17 01:30:48 2016 +0300 +++ b/Include/pyatomic.h Fri Sep 16 22:37:46 2016 -0300 @@ -127,7 +127,7 @@ static __inline__ void _Py_ANNOTATE_MEMORY_ORDER(const volatile void *address, _Py_memory_order order) { - (void)address; /* shut up -Wunused-parameter */ + (void)address; /* shut up -Wunused-parameter */ switch(order) { case _Py_memory_order_release: case _Py_memory_order_acq_rel: diff -r 9d0f4da4d531 Include/pyfpe.h --- a/Include/pyfpe.h Sat Sep 17 01:30:48 2016 +0300 +++ b/Include/pyfpe.h Fri Sep 16 22:37:46 2016 -0300 @@ -45,10 +45,10 @@ * Define macros for handling SIGFPE. * Lee Busby, LLNL, November, 1996 * busby1@llnl.gov - * + * ********************************************* * Overview of the system for handling SIGFPE: - * + * * This file (Include/pyfpe.h) defines a couple of "wrapper" macros for * insertion into your Python C code of choice. Their proper use is * discussed below. The file Python/pyfpe.c defines a pair of global @@ -59,33 +59,33 @@ * named fpectl. This module is standard in every respect. It can be loaded * either statically or dynamically as you choose, and like any other * Python module, has no effect until you import it. - * + * * In the general case, there are three steps toward handling SIGFPE in any * Python code: - * + * * 1) Add the *_PROTECT macros to your C code as required to protect * dangerous floating point sections. - * + * * 2) Turn on the inclusion of the code by adding the ``--with-fpectl'' * flag at the time you run configure. If the fpectl or other modules * which use the *_PROTECT macros are to be dynamically loaded, be * sure they are compiled with WANT_SIGFPE_HANDLER defined. - * + * * 3) When python is built and running, import fpectl, and execute * fpectl.turnon_sigfpe(). This sets up the signal handler and enables * generation of SIGFPE whenever an exception occurs. From this point * on, any properly trapped SIGFPE should result in the Python * FloatingPointError exception. - * + * * Step 1 has been done already for the Python kernel code, and should be * done soon for the NumPy array package. Step 2 is usually done once at * python install time. Python's behavior with respect to SIGFPE is not * changed unless you also do step 3. Thus you can control this new * facility at compile time, or run time, or both. - * - ******************************** + * + ******************************** * Using the macros in your code: - * + * * static PyObject *foobar(PyObject *self,PyObject *args) * { * .... @@ -94,17 +94,17 @@ * PyFPE_END_PROTECT(result) * .... * } - * + * * If a floating point error occurs in dangerous_op, foobar returns 0 (NULL), * after setting the associated value of the FloatingPointError exception to * "Error in foobar". ``Dangerous_op'' can be a single operation, or a block * of code, function calls, or any combination, so long as no alternate * return is possible before the PyFPE_END_PROTECT macro is reached. - * + * * The macros can only be used in a function context where an error return * can be recognized as signaling a Python exception. (Generally, most * functions that return a PyObject * will qualify.) - * + * * Guido's original design suggestion for PyFPE_START_PROTECT and * PyFPE_END_PROTECT had them open and close a local block, with a locally * defined jmp_buf and jmp_buf pointer. This would allow recursive nesting @@ -112,17 +112,17 @@ * variables need to be declared with the "volatile" type qualifier to keep * setjmp from corrupting their values. Some current implementations seem * to be more restrictive. For example, the HPUX man page for setjmp says - * + * * Upon the return from a setjmp() call caused by a longjmp(), the * values of any non-static local variables belonging to the routine * from which setjmp() was called are undefined. Code which depends on * such values is not guaranteed to be portable. - * + * * I therefore decided on a more limited form of nesting, using a counter * variable (PyFPE_counter) to keep track of any recursion. If an exception * occurs in an ``inner'' pair of macros, the return will apparently * come from the outermost level. - * + * */ #ifdef WANT_SIGFPE_HANDLER @@ -135,9 +135,9 @@ #define PyFPE_START_PROTECT(err_string, leave_stmt) \ if (!PyFPE_counter++ && setjmp(PyFPE_jbuf)) { \ - PyErr_SetString(PyExc_FloatingPointError, err_string); \ - PyFPE_counter = 0; \ - leave_stmt; \ + PyErr_SetString(PyExc_FloatingPointError, err_string); \ + PyFPE_counter = 0; \ + leave_stmt; \ } /* @@ -146,14 +146,14 @@ * this statement so that it gets executed *before* the unsafe expression * which we're trying to protect. That pretty well messes things up, * of course. - * + * * If the expression(s) you're trying to protect don't happen to return a * value, you will need to manufacture a dummy result just to preserve the * correct ordering of statements. Note that the macro passes the address * of its argument (so you need to give it something which is addressable). * If your expression returns multiple results, pass the last such result * to PyFPE_END_PROTECT. - * + * * Note that PyFPE_dummy returns a double, which is cast to int. * This seeming insanity is to tickle the Floating Point Unit (FPU). * If an exception has occurred in a preceding floating point operation, diff -r 9d0f4da4d531 Include/pymath.h --- a/Include/pymath.h Sat Sep 17 01:30:48 2016 +0300 +++ b/Include/pymath.h Fri Sep 16 22:37:46 2016 -0300 @@ -187,14 +187,14 @@ * result. * Caution: * This isn't reliable. C99 no longer requires libm to set errno under - * any exceptional condition, but does require +- HUGE_VAL return - * values on overflow. A 754 box *probably* maps HUGE_VAL to a - * double infinity, and we're cool if that's so, unless the input - * was an infinity and an infinity is the expected result. A C89 - * system sets errno to ERANGE, so we check for that too. We're - * out of luck if a C99 754 box doesn't map HUGE_VAL to +Inf, or - * if the returned result is a NaN, or if a C89 box returns HUGE_VAL - * in non-overflow cases. + * any exceptional condition, but does require +- HUGE_VAL return + * values on overflow. A 754 box *probably* maps HUGE_VAL to a + * double infinity, and we're cool if that's so, unless the input + * was an infinity and an infinity is the expected result. A C89 + * system sets errno to ERANGE, so we check for that too. We're + * out of luck if a C99 754 box doesn't map HUGE_VAL to +Inf, or + * if the returned result is a NaN, or if a C89 box returns HUGE_VAL + * in non-overflow cases. * X is evaluated more than once. * Some platforms have better way to spell this, so expect some #ifdef'ery. * @@ -211,8 +211,8 @@ #define Py_OVERFLOWED(X) isinf(X) #else #define Py_OVERFLOWED(X) ((X) != 0.0 && (errno == ERANGE || \ - (X) == Py_HUGE_VAL || \ - (X) == -Py_HUGE_VAL)) + (X) == Py_HUGE_VAL || \ + (X) == -Py_HUGE_VAL)) #endif #endif /* Py_PYMATH_H */ diff -r 9d0f4da4d531 Include/pymem.h --- a/Include/pymem.h Sat Sep 17 01:30:48 2016 +0300 +++ b/Include/pymem.h Fri Sep 16 22:37:46 2016 -0300 @@ -133,11 +133,11 @@ */ #define PyMem_New(type, n) \ - ( ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \ - ( (type *) PyMem_Malloc((n) * sizeof(type)) ) ) + ( ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \ + ( (type *) PyMem_Malloc((n) * sizeof(type)) ) ) #define PyMem_NEW(type, n) \ - ( ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \ - ( (type *) PyMem_MALLOC((n) * sizeof(type)) ) ) + ( ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \ + ( (type *) PyMem_MALLOC((n) * sizeof(type)) ) ) /* * The value of (p) is always clobbered by this macro regardless of success. @@ -146,17 +146,17 @@ * caller's memory error handler to not lose track of it. */ #define PyMem_Resize(p, type, n) \ - ( (p) = ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \ - (type *) PyMem_Realloc((p), (n) * sizeof(type)) ) + ( (p) = ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \ + (type *) PyMem_Realloc((p), (n) * sizeof(type)) ) #define PyMem_RESIZE(p, type, n) \ - ( (p) = ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \ - (type *) PyMem_REALLOC((p), (n) * sizeof(type)) ) + ( (p) = ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \ + (type *) PyMem_REALLOC((p), (n) * sizeof(type)) ) /* PyMem{Del,DEL} are left over from ancient days, and shouldn't be used * anymore. They're just confusing aliases for PyMem_{Free,FREE} now. */ -#define PyMem_Del PyMem_Free -#define PyMem_DEL PyMem_FREE +#define PyMem_Del PyMem_Free +#define PyMem_DEL PyMem_FREE #ifndef Py_LIMITED_API typedef enum { diff -r 9d0f4da4d531 Include/pythread.h --- a/Include/pythread.h Sat Sep 17 01:30:48 2016 +0300 +++ b/Include/pythread.h Fri Sep 16 22:37:46 2016 -0300 @@ -25,8 +25,8 @@ PyAPI_FUNC(PyThread_type_lock) PyThread_allocate_lock(void); PyAPI_FUNC(void) PyThread_free_lock(PyThread_type_lock); PyAPI_FUNC(int) PyThread_acquire_lock(PyThread_type_lock, int); -#define WAIT_LOCK 1 -#define NOWAIT_LOCK 0 +#define WAIT_LOCK 1 +#define NOWAIT_LOCK 0 /* PY_TIMEOUT_T is the integral type used to specify timeouts when waiting on a lock (see PyThread_acquire_lock_timed() below). diff -r 9d0f4da4d531 Include/sliceobject.h --- a/Include/sliceobject.h Sat Sep 17 01:30:48 2016 +0300 +++ b/Include/sliceobject.h Fri Sep 16 22:37:46 2016 -0300 @@ -21,7 +21,7 @@ #ifndef Py_LIMITED_API typedef struct { PyObject_HEAD - PyObject *start, *stop, *step; /* not NULL */ + PyObject *start, *stop, *step; /* not NULL */ } PySliceObject; #endif @@ -41,8 +41,8 @@ PyAPI_FUNC(int) PySlice_GetIndices(PyObject *r, Py_ssize_t length, Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step); PyAPI_FUNC(int) PySlice_GetIndicesEx(PyObject *r, Py_ssize_t length, - Py_ssize_t *start, Py_ssize_t *stop, - Py_ssize_t *step, Py_ssize_t *slicelength); + Py_ssize_t *start, Py_ssize_t *stop, + Py_ssize_t *step, Py_ssize_t *slicelength); #ifdef __cplusplus } diff -r 9d0f4da4d531 Include/token.h --- a/Include/token.h Sat Sep 17 01:30:48 2016 +0300 +++ b/Include/token.h Fri Sep 16 22:37:46 2016 -0300 @@ -9,73 +9,73 @@ #undef TILDE /* Prevent clash of our definition with system macro. Ex AIX, ioctl.h */ -#define ENDMARKER 0 -#define NAME 1 -#define NUMBER 2 -#define STRING 3 -#define NEWLINE 4 -#define INDENT 5 -#define DEDENT 6 -#define LPAR 7 -#define RPAR 8 -#define LSQB 9 -#define RSQB 10 -#define COLON 11 -#define COMMA 12 -#define SEMI 13 -#define PLUS 14 -#define MINUS 15 -#define STAR 16 -#define SLASH 17 -#define VBAR 18 -#define AMPER 19 -#define LESS 20 -#define GREATER 21 -#define EQUAL 22 -#define DOT 23 -#define PERCENT 24 -#define LBRACE 25 -#define RBRACE 26 -#define EQEQUAL 27 -#define NOTEQUAL 28 -#define LESSEQUAL 29 -#define GREATEREQUAL 30 -#define TILDE 31 -#define CIRCUMFLEX 32 -#define LEFTSHIFT 33 -#define RIGHTSHIFT 34 -#define DOUBLESTAR 35 -#define PLUSEQUAL 36 -#define MINEQUAL 37 -#define STAREQUAL 38 -#define SLASHEQUAL 39 -#define PERCENTEQUAL 40 -#define AMPEREQUAL 41 -#define VBAREQUAL 42 -#define CIRCUMFLEXEQUAL 43 -#define LEFTSHIFTEQUAL 44 -#define RIGHTSHIFTEQUAL 45 -#define DOUBLESTAREQUAL 46 -#define DOUBLESLASH 47 +#define ENDMARKER 0 +#define NAME 1 +#define NUMBER 2 +#define STRING 3 +#define NEWLINE 4 +#define INDENT 5 +#define DEDENT 6 +#define LPAR 7 +#define RPAR 8 +#define LSQB 9 +#define RSQB 10 +#define COLON 11 +#define COMMA 12 +#define SEMI 13 +#define PLUS 14 +#define MINUS 15 +#define STAR 16 +#define SLASH 17 +#define VBAR 18 +#define AMPER 19 +#define LESS 20 +#define GREATER 21 +#define EQUAL 22 +#define DOT 23 +#define PERCENT 24 +#define LBRACE 25 +#define RBRACE 26 +#define EQEQUAL 27 +#define NOTEQUAL 28 +#define LESSEQUAL 29 +#define GREATEREQUAL 30 +#define TILDE 31 +#define CIRCUMFLEX 32 +#define LEFTSHIFT 33 +#define RIGHTSHIFT 34 +#define DOUBLESTAR 35 +#define PLUSEQUAL 36 +#define MINEQUAL 37 +#define STAREQUAL 38 +#define SLASHEQUAL 39 +#define PERCENTEQUAL 40 +#define AMPEREQUAL 41 +#define VBAREQUAL 42 +#define CIRCUMFLEXEQUAL 43 +#define LEFTSHIFTEQUAL 44 +#define RIGHTSHIFTEQUAL 45 +#define DOUBLESTAREQUAL 46 +#define DOUBLESLASH 47 #define DOUBLESLASHEQUAL 48 -#define AT 49 -#define ATEQUAL 50 -#define RARROW 51 -#define ELLIPSIS 52 +#define AT 49 +#define ATEQUAL 50 +#define RARROW 51 +#define ELLIPSIS 52 /* Don't forget to update the table _PyParser_TokenNames in tokenizer.c! */ -#define OP 53 -#define AWAIT 54 -#define ASYNC 55 -#define ERRORTOKEN 56 -#define N_TOKENS 57 +#define OP 53 +#define AWAIT 54 +#define ASYNC 55 +#define ERRORTOKEN 56 +#define N_TOKENS 57 /* Special definitions for cooperation with parser */ -#define NT_OFFSET 256 +#define NT_OFFSET 256 -#define ISTERMINAL(x) ((x) < NT_OFFSET) -#define ISNONTERMINAL(x) ((x) >= NT_OFFSET) -#define ISEOF(x) ((x) == ENDMARKER) +#define ISTERMINAL(x) ((x) < NT_OFFSET) +#define ISNONTERMINAL(x) ((x) >= NT_OFFSET) +#define ISEOF(x) ((x) == ENDMARKER) PyAPI_DATA(const char *) _PyParser_TokenNames[]; /* Token names */ diff -r 9d0f4da4d531 Mac/PythonLauncher/FileSettings.h --- a/Mac/PythonLauncher/FileSettings.h Sat Sep 17 01:30:48 2016 +0300 +++ b/Mac/PythonLauncher/FileSettings.h Fri Sep 16 22:37:46 2016 -0300 @@ -24,18 +24,18 @@ @interface FileSettings : NSObject { - NSString *interpreter; // The pathname of the interpreter to use - NSArray *interpreters; // List of known interpreters - BOOL honourhashbang; // #! line overrides interpreter - BOOL debug; // -d option: debug parser - BOOL verbose; // -v option: verbose import - BOOL inspect; // -i option: interactive mode after script - BOOL optimize; // -O option: optimize bytecode - BOOL nosite; // -S option: don't import site.py - BOOL tabs; // -t option: warn about inconsistent tabs - NSString *others; // other options - NSString *scriptargs; // script arguments (not for preferences) - BOOL with_terminal; // Run in terminal window + NSString *interpreter; // The pathname of the interpreter to use + NSArray *interpreters; // List of known interpreters + BOOL honourhashbang; // #! line overrides interpreter + BOOL debug; // -d option: debug parser + BOOL verbose; // -v option: verbose import + BOOL inspect; // -i option: interactive mode after script + BOOL optimize; // -O option: optimize bytecode + BOOL nosite; // -S option: don't import site.py + BOOL tabs; // -t option: warn about inconsistent tabs + NSString *others; // other options + NSString *scriptargs; // script arguments (not for preferences) + BOOL with_terminal; // Run in terminal window FileSettings *origsource; NSString *prefskey; diff -r 9d0f4da4d531 Mac/PythonLauncher/MyAppDelegate.h --- a/Mac/PythonLauncher/MyAppDelegate.h Sat Sep 17 01:30:48 2016 +0300 +++ b/Mac/PythonLauncher/MyAppDelegate.h Fri Sep 16 22:37:46 2016 -0300 @@ -4,8 +4,8 @@ @interface MyAppDelegate : NSObject { - BOOL initial_action_done; - BOOL should_terminate; + BOOL initial_action_done; + BOOL should_terminate; } - (id)init; - (IBAction)showPreferences:(id)sender; diff -r 9d0f4da4d531 Modules/rotatingtree.h --- a/Modules/rotatingtree.h Sat Sep 17 01:30:48 2016 +0300 +++ b/Modules/rotatingtree.h Fri Sep 16 22:37:46 2016 -0300 @@ -16,12 +16,12 @@ typedef int (*rotating_tree_enum_fn) (rotating_node_t *node, void *arg); struct rotating_node_s { - void *key; - rotating_node_t *left; - rotating_node_t *right; + void *key; + rotating_node_t *left; + rotating_node_t *right; }; void RotatingTree_Add(rotating_node_t **root, rotating_node_t *node); rotating_node_t* RotatingTree_Get(rotating_node_t **root, void *key); int RotatingTree_Enum(rotating_node_t *root, rotating_tree_enum_fn enumfn, - void *arg); + void *arg); diff -r 9d0f4da4d531 PC/pyconfig.h --- a/PC/pyconfig.h Sat Sep 17 01:30:48 2016 +0300 +++ b/PC/pyconfig.h Fri Sep 16 22:37:46 2016 -0300 @@ -31,7 +31,7 @@ /* Deprecated USE_DL_EXPORT macro - please use Py_BUILD_CORE */ #ifdef USE_DL_EXPORT -# define Py_BUILD_CORE +# define Py_BUILD_CORE #endif /* USE_DL_EXPORT */ /* Visual Studio 2005 introduces deprecation warnings for @@ -62,13 +62,13 @@ #define HAVE_STRFTIME #define DONT_HAVE_SIG_ALARM #define DONT_HAVE_SIG_PAUSE -#define LONG_BIT 32 +#define LONG_BIT 32 #define WORD_BIT 32 #define MS_WIN32 /* only support win32 and greater. */ #define MS_WINDOWS #ifndef PYTHONPATH -# define PYTHONPATH L".\\DLLs;.\\lib" +# define PYTHONPATH L".\\DLLs;.\\lib" #endif #define NT_THREADS #define WITH_THREAD @@ -90,9 +90,9 @@ * literally in the string. */ #define _Py_PASTE_VERSION(SUFFIX) \ - ("[MSC v." _Py_STRINGIZE(_MSC_VER) " " SUFFIX "]") + ("[MSC v." _Py_STRINGIZE(_MSC_VER) " " SUFFIX "]") /* e.g., this produces, after compile-time string catenation, - * ("[MSC v.1200 32 bit (Intel)]") + * ("[MSC v.1200 32 bit (Intel)]") * * _Py_STRINGIZE(_MSC_VER) expands to * _Py_STRINGIZE1((_MSC_VER)) expands to @@ -111,7 +111,7 @@ *and* on Win64. For the same reasons, in Python, MS_WIN32 is defined on Win32 *and* Win64. Win32 only code must therefore be guarded as follows: - #if defined(MS_WIN32) && !defined(MS_WIN64) + #if defined(MS_WIN32) && !defined(MS_WIN64) Some modules are disabled on Itanium processors, therefore we have MS_WINI64 set for those targets, otherwise MS_WINX64 */ @@ -261,22 +261,22 @@ /* End of compilers - finish up */ #ifndef NO_STDIO_H -# include +# include #endif /* 64 bit ints are usually spelt __int64 unless compiler has overridden */ #ifndef PY_LONG_LONG -# define PY_LONG_LONG __int64 -# define PY_LLONG_MAX _I64_MAX -# define PY_LLONG_MIN _I64_MIN -# define PY_ULLONG_MAX _UI64_MAX +# define PY_LONG_LONG __int64 +# define PY_LLONG_MAX _I64_MAX +# define PY_LLONG_MIN _I64_MIN +# define PY_ULLONG_MAX _UI64_MAX #endif /* For Windows the Python core is in a DLL by default. Test Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */ #if !defined(MS_NO_COREDLL) && !defined(Py_NO_ENABLE_SHARED) -# define Py_ENABLE_SHARED 1 /* standard symbol for shared library */ -# define MS_COREDLL /* deprecated old symbol */ +# define Py_ENABLE_SHARED 1 /* standard symbol for shared library */ +# define MS_COREDLL /* deprecated old symbol */ #endif /* !MS_NO_COREDLL && ... */ /* All windows compilers that use this header support __declspec */ @@ -284,57 +284,57 @@ /* For an MSVC DLL, we can nominate the .lib files used by extensions */ #ifdef MS_COREDLL -# ifndef Py_BUILD_CORE /* not building the core - must be an ext */ -# if defined(_MSC_VER) - /* So MSVC users need not specify the .lib file in - their Makefile (other compilers are generally - taken care of by distutils.) */ -# if defined(_DEBUG) -# pragma comment(lib,"python37_d.lib") -# elif defined(Py_LIMITED_API) -# pragma comment(lib,"python3.lib") -# else -# pragma comment(lib,"python37.lib") -# endif /* _DEBUG */ -# endif /* _MSC_VER */ -# endif /* Py_BUILD_CORE */ +# ifndef Py_BUILD_CORE /* not building the core - must be an ext */ +# if defined(_MSC_VER) + /* So MSVC users need not specify the .lib file in + their Makefile (other compilers are generally + taken care of by distutils.) */ +# if defined(_DEBUG) +# pragma comment(lib,"python37_d.lib") +# elif defined(Py_LIMITED_API) +# pragma comment(lib,"python3.lib") +# else +# pragma comment(lib,"python37.lib") +# endif /* _DEBUG */ +# endif /* _MSC_VER */ +# endif /* Py_BUILD_CORE */ #endif /* MS_COREDLL */ #if defined(MS_WIN64) /* maintain "win32" sys.platform for backward compatibility of Python code, the Win64 API should be close enough to the Win32 API to make this preferable */ -# define PLATFORM "win32" -# define SIZEOF_VOID_P 8 -# define SIZEOF_TIME_T 8 -# define SIZEOF_OFF_T 4 -# define SIZEOF_FPOS_T 8 -# define SIZEOF_HKEY 8 -# define SIZEOF_SIZE_T 8 +# define PLATFORM "win32" +# define SIZEOF_VOID_P 8 +# define SIZEOF_TIME_T 8 +# define SIZEOF_OFF_T 4 +# define SIZEOF_FPOS_T 8 +# define SIZEOF_HKEY 8 +# define SIZEOF_SIZE_T 8 /* configure.ac defines HAVE_LARGEFILE_SUPPORT iff HAVE_LONG_LONG, sizeof(off_t) > sizeof(long), and sizeof(PY_LONG_LONG) >= sizeof(off_t). On Win64 the second condition is not true, but if fpos_t replaces off_t then this is true. The uses of HAVE_LARGEFILE_SUPPORT imply that Win64 should define this. */ -# define HAVE_LARGEFILE_SUPPORT +# define HAVE_LARGEFILE_SUPPORT #elif defined(MS_WIN32) -# define PLATFORM "win32" -# define HAVE_LARGEFILE_SUPPORT -# define SIZEOF_VOID_P 4 -# define SIZEOF_OFF_T 4 -# define SIZEOF_FPOS_T 8 -# define SIZEOF_HKEY 4 -# define SIZEOF_SIZE_T 4 - /* MS VS2005 changes time_t to a 64-bit type on all platforms */ -# if defined(_MSC_VER) && _MSC_VER >= 1400 -# define SIZEOF_TIME_T 8 -# else -# define SIZEOF_TIME_T 4 -# endif +# define PLATFORM "win32" +# define HAVE_LARGEFILE_SUPPORT +# define SIZEOF_VOID_P 4 +# define SIZEOF_OFF_T 4 +# define SIZEOF_FPOS_T 8 +# define SIZEOF_HKEY 4 +# define SIZEOF_SIZE_T 4 + /* MS VS2005 changes time_t to a 64-bit type on all platforms */ +# if defined(_MSC_VER) && _MSC_VER >= 1400 +# define SIZEOF_TIME_T 8 +# else +# define SIZEOF_TIME_T 4 +# endif #endif #ifdef _DEBUG -# define Py_DEBUG +# define Py_DEBUG #endif diff -r 9d0f4da4d531 Parser/parser.h --- a/Parser/parser.h Sat Sep 17 01:30:48 2016 +0300 +++ b/Parser/parser.h Fri Sep 16 22:37:46 2016 -0300 @@ -10,23 +10,23 @@ #define MAXSTACK 1500 typedef struct { - int s_state; /* State in current DFA */ - dfa *s_dfa; /* Current DFA */ - struct _node *s_parent; /* Where to add next node */ + int s_state; /* State in current DFA */ + dfa *s_dfa; /* Current DFA */ + struct _node *s_parent; /* Where to add next node */ } stackentry; typedef struct { - stackentry *s_top; /* Top entry */ - stackentry s_base[MAXSTACK];/* Array of stack entries */ - /* NB The stack grows down */ + stackentry *s_top; /* Top entry */ + stackentry s_base[MAXSTACK]; /* Array of stack entries */ + /* NB The stack grows down */ } stack; typedef struct { - stack p_stack; /* Stack of parser states */ - grammar *p_grammar; /* Grammar to use */ - node *p_tree; /* Top of parse tree */ + stack p_stack; /* Stack of parser states */ + grammar *p_grammar; /* Grammar to use */ + node *p_tree; /* Top of parse tree */ #ifdef PY_PARSER_REQUIRES_FUTURE_KEYWORD - unsigned long p_flags; /* see co_flags in Include/code.h */ + unsigned long p_flags; /* see co_flags in Include/code.h */ #endif } parser_state; diff -r 9d0f4da4d531 Python/thread_foobar.h --- a/Python/thread_foobar.h Sat Sep 17 01:30:48 2016 +0300 +++ b/Python/thread_foobar.h Fri Sep 16 22:37:46 2016 -0300 @@ -12,8 +12,8 @@ long PyThread_start_new_thread(void (*func)(void *), void *arg) { - int success = 0; /* init not needed when SOLARIS_THREADS and */ - /* C_THREADS implemented properly */ + int success = 0; /* init not needed when SOLARIS_THREADS and */ + /* C_THREADS implemented properly */ dprintf(("PyThread_start_new_thread called\n")); if (!initialized) @@ -69,9 +69,10 @@ { int success; - dprintf(("PyThread_acquire_lock_timed(%p, %lld, %d) called\n", lock, microseconds, intr_flag)); + dprintf(("PyThread_acquire_lock_timed(%p, %lld, %d) called\n", + lock, microseconds, intr_flag)); dprintf(("PyThread_acquire_lock_timed(%p, %lld, %d) -> %d\n", - lock, microseconds, intr_flag, success)); + lock, microseconds, intr_flag, success)); return success; }