mirror of
https://github.com/python/cpython.git
synced 2025-07-19 01:05:26 +00:00
replace Py_(u)intptr_t with the c99 standard types
This commit is contained in:
parent
3c397e4c39
commit
ca47063998
21 changed files with 86 additions and 86 deletions
|
@ -178,7 +178,7 @@ static void drop_gil(PyThreadState *tstate)
|
|||
/* Sub-interpreter support: threads might have been switched
|
||||
under our feet using PyThreadState_Swap(). Fix the GIL last
|
||||
holder variable so that our heuristics work. */
|
||||
_Py_atomic_store_relaxed(&gil_last_holder, (Py_uintptr_t)tstate);
|
||||
_Py_atomic_store_relaxed(&gil_last_holder, (uintptr_t)tstate);
|
||||
}
|
||||
|
||||
MUTEX_LOCK(gil_mutex);
|
||||
|
@ -240,7 +240,7 @@ _ready:
|
|||
_Py_ANNOTATE_RWLOCK_ACQUIRED(&gil_locked, /*is_write=*/1);
|
||||
|
||||
if (tstate != (PyThreadState*)_Py_atomic_load_relaxed(&gil_last_holder)) {
|
||||
_Py_atomic_store_relaxed(&gil_last_holder, (Py_uintptr_t)tstate);
|
||||
_Py_atomic_store_relaxed(&gil_last_holder, (uintptr_t)tstate);
|
||||
++gil_switch_number;
|
||||
}
|
||||
|
||||
|
|
|
@ -476,9 +476,9 @@ compiler_unit_check(struct compiler_unit *u)
|
|||
{
|
||||
basicblock *block;
|
||||
for (block = u->u_blocks; block != NULL; block = block->b_list) {
|
||||
assert((Py_uintptr_t)block != 0xcbcbcbcbU);
|
||||
assert((Py_uintptr_t)block != 0xfbfbfbfbU);
|
||||
assert((Py_uintptr_t)block != 0xdbdbdbdbU);
|
||||
assert((uintptr_t)block != 0xcbcbcbcbU);
|
||||
assert((uintptr_t)block != 0xfbfbfbfbU);
|
||||
assert((uintptr_t)block != 0xdbdbdbdbU);
|
||||
if (block->b_instr != NULL) {
|
||||
assert(block->b_ialloc > 0);
|
||||
assert(block->b_iused > 0);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#define GET_TSTATE() \
|
||||
((PyThreadState*)_Py_atomic_load_relaxed(&_PyThreadState_Current))
|
||||
#define SET_TSTATE(value) \
|
||||
_Py_atomic_store_relaxed(&_PyThreadState_Current, (Py_uintptr_t)(value))
|
||||
_Py_atomic_store_relaxed(&_PyThreadState_Current, (uintptr_t)(value))
|
||||
#define GET_INTERP_STATE() \
|
||||
(GET_TSTATE()->interp)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue