Ignore:
Timestamp:
Mar 19, 2014, 11:11:30 AM (11 years ago)
Author:
dmik
Message:

python: Update vendor to 2.7.6.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/vendor/current/Include/ceval.h

    r2 r388  
    99
    1010PyAPI_FUNC(PyObject *) PyEval_CallObjectWithKeywords(
    11         PyObject *, PyObject *, PyObject *);
    12 
    13 /* DLL-level Backwards compatibility: */
    14 #undef PyEval_CallObject
    15 PyAPI_FUNC(PyObject *) PyEval_CallObject(PyObject *, PyObject *);
     11    PyObject *, PyObject *, PyObject *);
    1612
    1713/* Inline this */
    1814#define PyEval_CallObject(func,arg) \
    19         PyEval_CallObjectWithKeywords(func, arg, (PyObject *)NULL)
     15    PyEval_CallObjectWithKeywords(func, arg, (PyObject *)NULL)
    2016
    2117PyAPI_FUNC(PyObject *) PyEval_CallFunction(PyObject *obj,
     
    5147
    5248#define Py_EnterRecursiveCall(where)                                    \
    53             (_Py_MakeRecCheck(PyThreadState_GET()->recursion_depth) &&  \
    54              _Py_CheckRecursiveCall(where))
    55 #define Py_LeaveRecursiveCall()                         \
    56             (--PyThreadState_GET()->recursion_depth)
     49            (_Py_MakeRecCheck(PyThreadState_GET()->recursion_depth) &&  \
     50             _Py_CheckRecursiveCall(where))
     51#define Py_LeaveRecursiveCall()                         \
     52            (--PyThreadState_GET()->recursion_depth)
    5753PyAPI_FUNC(int) _Py_CheckRecursiveCall(char *where);
    5854PyAPI_DATA(int) _Py_CheckRecursionLimit;
     
    8076   threads to run as follows:
    8177
    82         ...preparations here...
    83         Py_BEGIN_ALLOW_THREADS
    84         ...blocking system call here...
    85         Py_END_ALLOW_THREADS
    86         ...interpret result here...
     78    ...preparations here...
     79    Py_BEGIN_ALLOW_THREADS
     80    ...blocking system call here...
     81    Py_END_ALLOW_THREADS
     82    ...interpret result here...
    8783
    8884   The Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS pair expands to a
     
    9187   a line containing Py_BLOCK_THREADS before the return, e.g.
    9288
    93         if (...premature_exit...) {
    94                 Py_BLOCK_THREADS
    95                 PyErr_SetFromErrno(PyExc_IOError);
    96                 return NULL;
    97         }
     89    if (...premature_exit...) {
     90        Py_BLOCK_THREADS
     91        PyErr_SetFromErrno(PyExc_IOError);
     92        return NULL;
     93    }
    9894
    9995   An alternative is:
    10096
    101         Py_BLOCK_THREADS
    102         if (...premature_exit...) {
    103                 PyErr_SetFromErrno(PyExc_IOError);
    104                 return NULL;
    105         }
    106         Py_UNBLOCK_THREADS
     97    Py_BLOCK_THREADS
     98    if (...premature_exit...) {
     99        PyErr_SetFromErrno(PyExc_IOError);
     100        return NULL;
     101    }
     102    Py_UNBLOCK_THREADS
    107103
    108104   For convenience, that the value of 'errno' is restored across
     
    133129
    134130#define Py_BEGIN_ALLOW_THREADS { \
    135                         PyThreadState *_save; \
    136                         _save = PyEval_SaveThread();
    137 #define Py_BLOCK_THREADS        PyEval_RestoreThread(_save);
    138 #define Py_UNBLOCK_THREADS      _save = PyEval_SaveThread();
    139 #define Py_END_ALLOW_THREADS    PyEval_RestoreThread(_save); \
    140                 }
     131                        PyThreadState *_save; \
     132                        _save = PyEval_SaveThread();
     133#define Py_BLOCK_THREADS        PyEval_RestoreThread(_save);
     134#define Py_UNBLOCK_THREADS      _save = PyEval_SaveThread();
     135#define Py_END_ALLOW_THREADS    PyEval_RestoreThread(_save); \
     136                }
    141137
    142138#else /* !WITH_THREAD */
Note: See TracChangeset for help on using the changeset viewer.