Removed unintentional trailing spaces in non-external and non-generated C files.

This commit is contained in:
Serhiy Storchaka 2015-03-18 21:53:15 +02:00
parent 6c32585f67
commit 009b811d67
25 changed files with 56 additions and 56 deletions

View File

@ -38,7 +38,7 @@ static PyModuleDef noddymodule = {
}; };
PyMODINIT_FUNC PyMODINIT_FUNC
PyInit_noddy(void) PyInit_noddy(void)
{ {
PyObject* m; PyObject* m;

View File

@ -71,7 +71,7 @@ PyAPI_FUNC(int) PyCodec_KnownEncoding(
object is passed through the encoder function found for the given object is passed through the encoder function found for the given
encoding using the error handling method defined by errors. errors encoding using the error handling method defined by errors. errors
may be NULL to use the default method defined for the codec. may be NULL to use the default method defined for the codec.
Raises a LookupError in case no encoder can be found. Raises a LookupError in case no encoder can be found.
*/ */
@ -87,7 +87,7 @@ PyAPI_FUNC(PyObject *) PyCodec_Encode(
object is passed through the decoder function found for the given object is passed through the decoder function found for the given
encoding using the error handling method defined by errors. errors encoding using the error handling method defined by errors. errors
may be NULL to use the default method defined for the codec. may be NULL to use the default method defined for the codec.
Raises a LookupError in case no encoder can be found. Raises a LookupError in case no encoder can be found.
*/ */
@ -145,7 +145,7 @@ PyAPI_FUNC(PyObject *) _PyCodecInfo_GetIncrementalEncoder(
/* --- Codec Lookup APIs -------------------------------------------------- /* --- Codec Lookup APIs --------------------------------------------------
All APIs return a codec object with incremented refcount and are All APIs return a codec object with incremented refcount and are
based on _PyCodec_Lookup(). The same comments w/r to the encoding based on _PyCodec_Lookup(). The same comments w/r to the encoding

View File

@ -41,7 +41,7 @@ PyAPI_FUNC(int) _PySlice_GetLongIndices(PySliceObject *self, PyObject *length,
PyAPI_FUNC(int) PySlice_GetIndices(PyObject *r, Py_ssize_t length, PyAPI_FUNC(int) PySlice_GetIndices(PyObject *r, Py_ssize_t length,
Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step); Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step);
PyAPI_FUNC(int) PySlice_GetIndicesEx(PyObject *r, Py_ssize_t length, PyAPI_FUNC(int) PySlice_GetIndicesEx(PyObject *r, Py_ssize_t length,
Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *start, Py_ssize_t *stop,
Py_ssize_t *step, Py_ssize_t *slicelength); Py_ssize_t *step, Py_ssize_t *slicelength);
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -16,7 +16,7 @@ typedef struct {
int size; int size;
/* Get name for a given character code. Returns non-zero if /* Get name for a given character code. Returns non-zero if
success, zero if not. Does not set Python exceptions. success, zero if not. Does not set Python exceptions.
If self is NULL, data come from the default version of the database. If self is NULL, data come from the default version of the database.
If it is not NULL, it should be a unicodedata.ucd_X_Y_Z object */ If it is not NULL, it should be a unicodedata.ucd_X_Y_Z object */
int (*getname)(PyObject *self, Py_UCS4 code, char* buffer, int buflen, int (*getname)(PyObject *self, Py_UCS4 code, char* buffer, int buflen,

View File

@ -666,7 +666,7 @@ _bz2_BZ2Decompressor___init___impl(BZ2Decompressor *self)
self->unused_data = PyBytes_FromStringAndSize(NULL, 0); self->unused_data = PyBytes_FromStringAndSize(NULL, 0);
if (self->unused_data == NULL) if (self->unused_data == NULL)
goto error; goto error;
bzerror = BZ2_bzDecompressInit(&self->bzs, 0, 0); bzerror = BZ2_bzDecompressInit(&self->bzs, 0, 0);
if (catch_bz2_error(bzerror)) if (catch_bz2_error(bzerror))
goto error; goto error;

View File

@ -1055,7 +1055,7 @@ _buffered_readinto_generic(buffered *self, PyObject *args, char readinto1)
} }
else else
n = 0; n = 0;
if (n == 0 || (n == -2 && written > 0)) if (n == 0 || (n == -2 && written > 0))
break; break;
if (n < 0) { if (n < 0) {
@ -1065,7 +1065,7 @@ _buffered_readinto_generic(buffered *self, PyObject *args, char readinto1)
} }
goto end; goto end;
} }
/* At most one read in readinto1 mode */ /* At most one read in readinto1 mode */
if (readinto1) { if (readinto1) {
written += n; written += n;

View File

@ -149,10 +149,10 @@ grow_buffer(PyObject **buf, Py_ssize_t max_length)
{ {
Py_ssize_t size = PyBytes_GET_SIZE(*buf); Py_ssize_t size = PyBytes_GET_SIZE(*buf);
Py_ssize_t newsize = size + (size >> 3) + 6; Py_ssize_t newsize = size + (size >> 3) + 6;
if (max_length > 0 && newsize > max_length) if (max_length > 0 && newsize > max_length)
newsize = max_length; newsize = max_length;
return _PyBytes_Resize(buf, newsize); return _PyBytes_Resize(buf, newsize);
} }
@ -906,7 +906,7 @@ decompress_buf(Decompressor *d, Py_ssize_t max_length)
Py_ssize_t data_size = 0; Py_ssize_t data_size = 0;
PyObject *result; PyObject *result;
lzma_stream *lzs = &d->lzs; lzma_stream *lzs = &d->lzs;
if (max_length < 0 || max_length >= INITIAL_BUFFER_SIZE) if (max_length < 0 || max_length >= INITIAL_BUFFER_SIZE)
result = PyBytes_FromStringAndSize(NULL, INITIAL_BUFFER_SIZE); result = PyBytes_FromStringAndSize(NULL, INITIAL_BUFFER_SIZE);
else else
@ -916,7 +916,7 @@ decompress_buf(Decompressor *d, Py_ssize_t max_length)
lzs->next_out = (uint8_t *)PyBytes_AS_STRING(result); lzs->next_out = (uint8_t *)PyBytes_AS_STRING(result);
lzs->avail_out = PyBytes_GET_SIZE(result); lzs->avail_out = PyBytes_GET_SIZE(result);
for (;;) { for (;;) {
lzma_ret lzret; lzma_ret lzret;
@ -947,7 +947,7 @@ decompress_buf(Decompressor *d, Py_ssize_t max_length)
goto error; goto error;
return result; return result;
error: error:
Py_XDECREF(result); Py_XDECREF(result);
return NULL; return NULL;
@ -959,11 +959,11 @@ decompress(Decompressor *d, uint8_t *data, size_t len, Py_ssize_t max_length)
char input_buffer_in_use; char input_buffer_in_use;
PyObject *result; PyObject *result;
lzma_stream *lzs = &d->lzs; lzma_stream *lzs = &d->lzs;
/* Prepend unconsumed input if necessary */ /* Prepend unconsumed input if necessary */
if (lzs->next_in != NULL) { if (lzs->next_in != NULL) {
size_t avail_now, avail_total; size_t avail_now, avail_total;
/* Number of bytes we can append to input buffer */ /* Number of bytes we can append to input buffer */
avail_now = (d->input_buffer + d->input_buffer_size) avail_now = (d->input_buffer + d->input_buffer_size)
- (lzs->next_in + lzs->avail_in); - (lzs->next_in + lzs->avail_in);
@ -987,7 +987,7 @@ decompress(Decompressor *d, uint8_t *data, size_t len, Py_ssize_t max_length)
} }
d->input_buffer = tmp; d->input_buffer = tmp;
d->input_buffer_size = new_size; d->input_buffer_size = new_size;
lzs->next_in = d->input_buffer + offset; lzs->next_in = d->input_buffer + offset;
} }
else if (avail_now < len) { else if (avail_now < len) {
@ -1054,7 +1054,7 @@ decompress(Decompressor *d, uint8_t *data, size_t len, Py_ssize_t max_length)
lzs->next_in = d->input_buffer; lzs->next_in = d->input_buffer;
} }
} }
return result; return result;
error: error:
@ -1247,7 +1247,7 @@ Decompressor_dealloc(Decompressor *self)
{ {
if(self->input_buffer != NULL) if(self->input_buffer != NULL)
PyMem_Free(self->input_buffer); PyMem_Free(self->input_buffer);
lzma_end(&self->lzs); lzma_end(&self->lzs);
Py_CLEAR(self->unused_data); Py_CLEAR(self->unused_data);
#ifdef WITH_THREAD #ifdef WITH_THREAD

View File

@ -48,7 +48,7 @@ extern PyObject *pysqlite_microprotocols_adapt(
PyObject *obj, PyObject *proto, PyObject *alt); PyObject *obj, PyObject *proto, PyObject *alt);
extern PyObject * extern PyObject *
pysqlite_adapt(pysqlite_Cursor* self, PyObject *args); pysqlite_adapt(pysqlite_Cursor* self, PyObject *args);
#define pysqlite_adapt_doc \ #define pysqlite_adapt_doc \
"adapt(obj, protocol, alternate) -> adapt obj to given protocol. Non-standard." "adapt(obj, protocol, alternate) -> adapt obj to given protocol. Non-standard."

View File

@ -190,7 +190,7 @@ ndbuf_delete(NDArrayObject *nd, ndbuf_t *elt)
elt->prev->next = elt->next; elt->prev->next = elt->next;
else else
nd->head = elt->next; nd->head = elt->next;
if (elt->next) if (elt->next)
elt->next->prev = elt->prev; elt->next->prev = elt->prev;
@ -767,7 +767,7 @@ out:
+-----------------+-----------+-------------+----------------+ +-----------------+-----------+-------------+----------------+
| base.readonly | 0 | OK | OK | | base.readonly | 0 | OK | OK |
+-----------------+-----------+-------------+----------------+ +-----------------+-----------+-------------+----------------+
| base.format | NULL | OK | OK | | base.format | NULL | OK | OK |
+-----------------+-----------+-------------+----------------+ +-----------------+-----------+-------------+----------------+
| base.ndim | 1 | 1 | OK | | base.ndim | 1 | 1 | OK |
+-----------------+-----------+-------------+----------------+ +-----------------+-----------+-------------+----------------+
@ -2018,7 +2018,7 @@ ndarray_get_obj(NDArrayObject *self, void *closure)
{ {
Py_buffer *base = &self->head->base; Py_buffer *base = &self->head->base;
if (base->obj == NULL) { if (base->obj == NULL) {
Py_RETURN_NONE; Py_RETURN_NONE;
} }
Py_INCREF(base->obj); Py_INCREF(base->obj);
@ -2558,7 +2558,7 @@ result:
PyBuffer_Release(&v1); PyBuffer_Release(&v1);
PyBuffer_Release(&v2); PyBuffer_Release(&v2);
ret = equal ? Py_True : Py_False; ret = equal ? Py_True : Py_False;
Py_INCREF(ret); Py_INCREF(ret);
return ret; return ret;
} }

View File

@ -2476,7 +2476,7 @@ make_memoryview_from_NULL_pointer(PyObject *self)
return NULL; return NULL;
return PyMemoryView_FromBuffer(&info); return PyMemoryView_FromBuffer(&info);
} }
static PyObject * static PyObject *
test_from_contiguous(PyObject* self, PyObject *noargs) test_from_contiguous(PyObject* self, PyObject *noargs)
{ {

View File

@ -94,7 +94,7 @@ atexit_callfuncs(void)
if (exc_type) { if (exc_type) {
Py_DECREF(exc_type); Py_DECREF(exc_type);
Py_XDECREF(exc_value); Py_XDECREF(exc_value);
Py_XDECREF(exc_tb); Py_XDECREF(exc_tb);
} }
PyErr_Fetch(&exc_type, &exc_value, &exc_tb); PyErr_Fetch(&exc_type, &exc_value, &exc_tb);
if (!PyErr_ExceptionMatches(PyExc_SystemExit)) { if (!PyErr_ExceptionMatches(PyExc_SystemExit)) {
@ -147,7 +147,7 @@ atexit_register(PyObject *self, PyObject *args, PyObject *kwargs)
if (PyTuple_GET_SIZE(args) == 0) { if (PyTuple_GET_SIZE(args) == 0) {
PyErr_SetString(PyExc_TypeError, PyErr_SetString(PyExc_TypeError,
"register() takes at least 1 argument (0 given)"); "register() takes at least 1 argument (0 given)");
return NULL; return NULL;
} }
func = PyTuple_GET_ITEM(args, 0); func = PyTuple_GET_ITEM(args, 0);
@ -159,7 +159,7 @@ atexit_register(PyObject *self, PyObject *args, PyObject *kwargs)
new_callback = PyMem_Malloc(sizeof(atexit_callback)); new_callback = PyMem_Malloc(sizeof(atexit_callback));
if (new_callback == NULL) if (new_callback == NULL)
return PyErr_NoMemory(); return PyErr_NoMemory();
new_callback->args = PyTuple_GetSlice(args, 1, PyTuple_GET_SIZE(args)); new_callback->args = PyTuple_GetSlice(args, 1, PyTuple_GET_SIZE(args));
if (new_callback->args == NULL) { if (new_callback->args == NULL) {
@ -336,7 +336,7 @@ PyInit_atexit(void)
modstate = GET_ATEXIT_STATE(m); modstate = GET_ATEXIT_STATE(m);
modstate->callback_len = 32; modstate->callback_len = 32;
modstate->ncallbacks = 0; modstate->ncallbacks = 0;
modstate->atexit_callbacks = PyMem_New(atexit_callback*, modstate->atexit_callbacks = PyMem_New(atexit_callback*,
modstate->callback_len); modstate->callback_len);
if (modstate->atexit_callbacks == NULL) if (modstate->atexit_callbacks == NULL)
return NULL; return NULL;

View File

@ -2788,7 +2788,7 @@ validate_argument(node *tree)
int nch = NCH(tree); int nch = NCH(tree);
int res = (validate_ntype(tree, argument) int res = (validate_ntype(tree, argument)
&& ((nch == 1) || (nch == 2) || (nch == 3))); && ((nch == 1) || (nch == 2) || (nch == 3)));
if (res) if (res)
res = validate_test(CHILD(tree, 0)); res = validate_test(CHILD(tree, 0));
if (res && (nch == 2)) if (res && (nch == 2))
res = validate_comp_for(CHILD(tree, 1)); res = validate_comp_for(CHILD(tree, 1));

View File

@ -169,7 +169,7 @@ xx_roj(PyObject *self, PyObject *args)
/* ---------- */ /* ---------- */
static PyType_Slot Str_Type_slots[] = { static PyType_Slot Str_Type_slots[] = {
{Py_tp_base, NULL}, /* filled out in module init function */ {Py_tp_base, NULL}, /* filled out in module init function */
{0, 0}, {0, 0},
}; };

View File

@ -260,7 +260,7 @@ method_repr(PyMethodObject *a)
PyErr_Clear(); PyErr_Clear();
} }
} }
if (funcname != NULL && !PyUnicode_Check(funcname)) { if (funcname != NULL && !PyUnicode_Check(funcname)) {
Py_DECREF(funcname); Py_DECREF(funcname);
funcname = NULL; funcname = NULL;

View File

@ -212,7 +212,7 @@ calliter_iternext(calliterobject *it)
Py_DECREF(args); Py_DECREF(args);
if (result != NULL) { if (result != NULL) {
int ok; int ok;
ok = PyObject_RichCompareBool(it->it_sentinel, result, Py_EQ); ok = PyObject_RichCompareBool(it->it_sentinel, result, Py_EQ);
if (ok == 0) if (ok == 0)
return result; /* Common case, fast path */ return result; /* Common case, fast path */
Py_DECREF(result); Py_DECREF(result);

View File

@ -892,7 +892,7 @@ memory_from_contiguous_copy(Py_buffer *src, char order)
The logical structure of the input and output buffers is the same The logical structure of the input and output buffers is the same
(i.e. tolist(input) == tolist(output)), but the physical layout in (i.e. tolist(input) == tolist(output)), but the physical layout in
memory can be explicitly chosen. memory can be explicitly chosen.
As usual, if buffertype=PyBUF_WRITE, the exporter's buffer must be writable, As usual, if buffertype=PyBUF_WRITE, the exporter's buffer must be writable,
otherwise it may be writable or read-only. otherwise it may be writable or read-only.
@ -1241,7 +1241,7 @@ cast_to_1D(PyMemoryViewObject *mv, PyObject *format)
view->suboffsets = NULL; view->suboffsets = NULL;
init_flags(mv); init_flags(mv);
ret = 0; ret = 0;
out: out:
@ -2288,7 +2288,7 @@ memory_subscript(PyMemoryViewObject *self, PyObject *key)
{ {
Py_buffer *view; Py_buffer *view;
view = &(self->view); view = &(self->view);
CHECK_RELEASED(self); CHECK_RELEASED(self);
if (view->ndim == 0) { if (view->ndim == 0) {

View File

@ -37,7 +37,7 @@ module_init_dict(PyModuleObject *mod, PyObject *md_dict,
_Py_IDENTIFIER(__package__); _Py_IDENTIFIER(__package__);
_Py_IDENTIFIER(__loader__); _Py_IDENTIFIER(__loader__);
_Py_IDENTIFIER(__spec__); _Py_IDENTIFIER(__spec__);
if (md_dict == NULL) if (md_dict == NULL)
return -1; return -1;
if (doc == NULL) if (doc == NULL)

View File

@ -987,7 +987,7 @@ static PyObject *
longrangeiter_setstate(longrangeiterobject *r, PyObject *state) longrangeiter_setstate(longrangeiterobject *r, PyObject *state)
{ {
int cmp; int cmp;
/* clip the value */ /* clip the value */
PyObject *zero = PyLong_FromLong(0); PyObject *zero = PyLong_FromLong(0);
if (zero == NULL) if (zero == NULL)
@ -1007,7 +1007,7 @@ longrangeiter_setstate(longrangeiterobject *r, PyObject *state)
return NULL; return NULL;
if (cmp > 0) if (cmp > 0)
state = r->len; state = r->len;
Py_CLEAR(r->index); Py_CLEAR(r->index);
r->index = state; r->index = state;
Py_INCREF(r->index); Py_INCREF(r->index);

View File

@ -59,7 +59,7 @@ stringlib_expandtabs(PyObject *self, PyObject *args, PyObject *kwds)
j = 0; j = 0;
q = STRINGLIB_STR(u); q = STRINGLIB_STR(u);
for (p = STRINGLIB_STR(self); p < e; p++) { for (p = STRINGLIB_STR(self); p < e; p++) {
if (*p == '\t') { if (*p == '\t') {
if (tabsize > 0) { if (tabsize > 0) {

View File

@ -27,7 +27,7 @@
#define EXTENDED_CASE_MASK 0x4000 #define EXTENDED_CASE_MASK 0x4000
typedef struct { typedef struct {
/* /*
These are either deltas to the character or offsets in These are either deltas to the character or offsets in
_PyUnicode_ExtendedCase. _PyUnicode_ExtendedCase.
*/ */

View File

@ -96,7 +96,7 @@ error(int rc, wchar_t * format, ... )
fwprintf(stderr, L"%ls\n", message); fwprintf(stderr, L"%ls\n", message);
#else #else
MessageBox(NULL, message, TEXT("Python Launcher is sorry to say ..."), MessageBox(NULL, message, TEXT("Python Launcher is sorry to say ..."),
MB_OK); MB_OK);
#endif #endif
ExitProcess(rc); ExitProcess(rc);
} }
@ -349,7 +349,7 @@ locate_all_pythons()
locate_pythons_for_key(HKEY_CURRENT_USER, KEY_READ | KEY_WOW64_64KEY); locate_pythons_for_key(HKEY_CURRENT_USER, KEY_READ | KEY_WOW64_64KEY);
locate_pythons_for_key(HKEY_LOCAL_MACHINE, KEY_READ | KEY_WOW64_64KEY); locate_pythons_for_key(HKEY_LOCAL_MACHINE, KEY_READ | KEY_WOW64_64KEY);
} }
#endif #endif
// now hit the "native" key for this process bittedness. // now hit the "native" key for this process bittedness.
debug(L"locating Pythons in native registry\n"); debug(L"locating Pythons in native registry\n");
locate_pythons_for_key(HKEY_CURRENT_USER, KEY_READ); locate_pythons_for_key(HKEY_CURRENT_USER, KEY_READ);
@ -604,7 +604,7 @@ run_child(wchar_t * cmdline)
// window, or fetching a message). As this launcher doesn't do this // window, or fetching a message). As this launcher doesn't do this
// directly, that cursor remains even after the child process does these // directly, that cursor remains even after the child process does these
// things. We avoid that by doing a simple post+get message. // things. We avoid that by doing a simple post+get message.
// See http://bugs.python.org/issue17290 and // See http://bugs.python.org/issue17290 and
// https://bitbucket.org/vinay.sajip/pylauncher/issue/20/busy-cursor-for-a-long-time-when-running // https://bitbucket.org/vinay.sajip/pylauncher/issue/20/busy-cursor-for-a-long-time-when-running
MSG msg; MSG msg;

View File

@ -31,7 +31,7 @@ static unsigned long gil_interval = DEFAULT_INTERVAL;
variable (gil_drop_request) is used for that purpose, which is checked variable (gil_drop_request) is used for that purpose, which is checked
at every turn of the eval loop. That variable is set after a wait of at every turn of the eval loop. That variable is set after a wait of
`interval` microseconds on `gil_cond` has timed out. `interval` microseconds on `gil_cond` has timed out.
[Actually, another volatile boolean variable (eval_breaker) is used [Actually, another volatile boolean variable (eval_breaker) is used
which ORs several conditions into one. Volatile booleans are which ORs several conditions into one. Volatile booleans are
sufficient as inter-thread signalling means since Python is run sufficient as inter-thread signalling means since Python is run
@ -41,7 +41,7 @@ static unsigned long gil_interval = DEFAULT_INTERVAL;
time (`interval` microseconds) before setting gil_drop_request. This time (`interval` microseconds) before setting gil_drop_request. This
encourages a defined switching period, but doesn't enforce it since encourages a defined switching period, but doesn't enforce it since
opcodes can take an arbitrary time to execute. opcodes can take an arbitrary time to execute.
The `interval` value is available for the user to read and modify The `interval` value is available for the user to read and modify
using the Python API `sys.{get,set}switchinterval()`. using the Python API `sys.{get,set}switchinterval()`.
@ -51,7 +51,7 @@ static unsigned long gil_interval = DEFAULT_INTERVAL;
the value of gil_last_holder is changed to something else than its the value of gil_last_holder is changed to something else than its
own thread state pointer, indicating that another thread was able to own thread state pointer, indicating that another thread was able to
take the GIL. take the GIL.
This is meant to prohibit the latency-adverse behaviour on multi-core This is meant to prohibit the latency-adverse behaviour on multi-core
machines where one thread would speculatively release the GIL, but still machines where one thread would speculatively release the GIL, but still
run and end up being the first to re-acquire it, making the "timeslices" run and end up being the first to re-acquire it, making the "timeslices"
@ -186,7 +186,7 @@ static void drop_gil(PyThreadState *tstate)
_Py_atomic_store_relaxed(&gil_locked, 0); _Py_atomic_store_relaxed(&gil_locked, 0);
COND_SIGNAL(gil_cond); COND_SIGNAL(gil_cond);
MUTEX_UNLOCK(gil_mutex); MUTEX_UNLOCK(gil_mutex);
#ifdef FORCE_SWITCHING #ifdef FORCE_SWITCHING
if (_Py_atomic_load_relaxed(&gil_drop_request) && tstate != NULL) { if (_Py_atomic_load_relaxed(&gil_drop_request) && tstate != NULL) {
MUTEX_LOCK(switch_mutex); MUTEX_LOCK(switch_mutex);
@ -215,7 +215,7 @@ static void take_gil(PyThreadState *tstate)
if (!_Py_atomic_load_relaxed(&gil_locked)) if (!_Py_atomic_load_relaxed(&gil_locked))
goto _ready; goto _ready;
while (_Py_atomic_load_relaxed(&gil_locked)) { while (_Py_atomic_load_relaxed(&gil_locked)) {
int timed_out = 0; int timed_out = 0;
unsigned long saved_switchnum; unsigned long saved_switchnum;
@ -254,7 +254,7 @@ _ready:
if (tstate->async_exc != NULL) { if (tstate->async_exc != NULL) {
_PyEval_SignalAsyncExc(); _PyEval_SignalAsyncExc();
} }
MUTEX_UNLOCK(gil_mutex); MUTEX_UNLOCK(gil_mutex);
errno = err; errno = err;
} }

View File

@ -1,4 +1,4 @@
/* /*
* Portable condition variable support for windows and pthreads. * Portable condition variable support for windows and pthreads.
* Everything is inline, this header can be included where needed. * Everything is inline, this header can be included where needed.
* *
@ -105,7 +105,7 @@ PyCOND_TIMEDWAIT(PyCOND_T *cond, PyMUTEX_T *mut, PY_LONG_LONG us)
return 1; return 1;
else if (r) else if (r)
return -1; return -1;
else else
return 0; return 0;
} }
@ -255,7 +255,7 @@ _PyCOND_WAIT_MS(PyCOND_T *cv, PyMUTEX_T *cs, DWORD ms)
* a new thread comes along, it will pass right throuhgh, having * a new thread comes along, it will pass right throuhgh, having
* adjusted it to (waiting == 0 && sem.count == 0). * adjusted it to (waiting == 0 && sem.count == 0).
*/ */
if (wait == WAIT_FAILED) if (wait == WAIT_FAILED)
return -1; return -1;
/* return 0 on success, 1 on timeout */ /* return 0 on success, 1 on timeout */

View File

@ -1,6 +1,6 @@
#include "pyconfig.h" #include "pyconfig.h"
#include "pyfpe.h" #include "pyfpe.h"
/* /*
* The signal handler for SIGFPE is actually declared in an external * The signal handler for SIGFPE is actually declared in an external
* module fpectl, or as preferred by the user. These variable * module fpectl, or as preferred by the user. These variable
* definitions are required in order to compile Python without * definitions are required in order to compile Python without
@ -13,7 +13,7 @@ jmp_buf PyFPE_jbuf;
int PyFPE_counter = 0; int PyFPE_counter = 0;
#endif #endif
/* Have this outside the above #ifdef, since some picky ANSI compilers issue a /* Have this outside the above #ifdef, since some picky ANSI compilers issue a
warning when compiling an empty file. */ warning when compiling an empty file. */
double double

View File

@ -228,7 +228,7 @@ new_threadstate(PyInterpreterState *interp, int init)
tstate->next->prev = tstate; tstate->next->prev = tstate;
interp->tstate_head = tstate; interp->tstate_head = tstate;
HEAD_UNLOCK(); HEAD_UNLOCK();
#if defined _MSC_VER && _MSC_VER >= 1900 #if defined _MSC_VER && _MSC_VER >= 1900
/* Issue #23524: Temporary fix to disable termination due to invalid parameters */ /* Issue #23524: Temporary fix to disable termination due to invalid parameters */
_set_thread_local_invalid_parameter_handler((_invalid_parameter_handler)_Py_silent_invalid_parameter_handler); _set_thread_local_invalid_parameter_handler((_invalid_parameter_handler)_Py_silent_invalid_parameter_handler);