mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +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
|
|
@ -1019,7 +1019,7 @@ wrapper_dealloc(wrapperobject *wp)
|
|||
static PyObject *
|
||||
wrapper_richcompare(PyObject *a, PyObject *b, int op)
|
||||
{
|
||||
Py_intptr_t result;
|
||||
intptr_t result;
|
||||
PyObject *v;
|
||||
PyWrapperDescrObject *a_descr, *b_descr;
|
||||
|
||||
|
|
|
|||
|
|
@ -989,13 +989,13 @@ PyObject *
|
|||
PyLong_FromVoidPtr(void *p)
|
||||
{
|
||||
#if SIZEOF_VOID_P <= SIZEOF_LONG
|
||||
return PyLong_FromUnsignedLong((unsigned long)(Py_uintptr_t)p);
|
||||
return PyLong_FromUnsignedLong((unsigned long)(uintptr_t)p);
|
||||
#else
|
||||
|
||||
#if SIZEOF_LONG_LONG < SIZEOF_VOID_P
|
||||
# error "PyLong_FromVoidPtr: sizeof(long long) < sizeof(void*)"
|
||||
#endif
|
||||
return PyLong_FromUnsignedLongLong((unsigned long long)(Py_uintptr_t)p);
|
||||
return PyLong_FromUnsignedLongLong((unsigned long long)(uintptr_t)p);
|
||||
#endif /* SIZEOF_VOID_P <= SIZEOF_LONG */
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ extern void _PyMem_DumpTraceback(int fd, const void *ptr);
|
|||
#define uint unsigned int /* assuming >= 16 bits */
|
||||
|
||||
#undef uptr
|
||||
#define uptr Py_uintptr_t
|
||||
#define uptr uintptr_t
|
||||
|
||||
/* Forward declaration */
|
||||
static void* _PyMem_DebugRawMalloc(void *ctx, size_t size);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue