| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 097f74a commit b556f53
7 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -418,7 +418,7 @@ CThunkObject *_ctypes_alloc_callback(PyObject *callable, | |||
| 418 | 418 | goto error; | |
| 419 | 419 | } | |
| 420 | 420 | #if HAVE_FFI_PREP_CLOSURE_LOC | |
| 421 | - # if USING_APPLE_OS_LIBFFI | ||
| 421 | + # ifdef USING_APPLE_OS_LIBFFI | ||
| 422 | 422 | # define HAVE_FFI_PREP_CLOSURE_LOC_RUNTIME __builtin_available(macos 10.15, ios 13, watchos 6, tvos 13, *) | |
| 423 | 423 | # else | |
| 424 | 424 | # define HAVE_FFI_PREP_CLOSURE_LOC_RUNTIME 1 | |
@@ -430,7 +430,7 @@ CThunkObject *_ctypes_alloc_callback(PyObject *callable, | |||
| 430 | 430 | } else | |
| 431 | 431 | #endif | |
| 432 | 432 | { | |
| 433 | - #if USING_APPLE_OS_LIBFFI && defined(__arm64__) | ||
| 433 | + #if defined(USING_APPLE_OS_LIBFFI) && defined(__arm64__) | ||
| 434 | 434 | PyErr_Format(PyExc_NotImplementedError, "ffi_prep_closure_loc() is missing"); | |
| 435 | 435 | goto error; | |
| 436 | 436 | #else | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -826,7 +826,7 @@ static int _call_function_pointer(int flags, | |||
| 826 | 826 | cc = FFI_STDCALL; | |
| 827 | 827 | #endif | |
| 828 | 828 | ||
| 829 | - # if USING_APPLE_OS_LIBFFI | ||
| 829 | + # ifdef USING_APPLE_OS_LIBFFI | ||
| 830 | 830 | # define HAVE_FFI_PREP_CIF_VAR_RUNTIME __builtin_available(macos 10.15, ios 13, watchos 6, tvos 13, *) | |
| 831 | 831 | # elif HAVE_FFI_PREP_CIF_VAR | |
| 832 | 832 | # define HAVE_FFI_PREP_CIF_VAR_RUNTIME true | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -362,7 +362,7 @@ PyObject *_ctypes_get_errobj(int **pspace); | |||
| 362 | 362 | extern PyObject *ComError; | |
| 363 | 363 | #endif | |
| 364 | 364 | ||
| 365 | - #if USING_MALLOC_CLOSURE_DOT_C | ||
| 365 | + #ifdef USING_MALLOC_CLOSURE_DOT_C | ||
| 366 | 366 | void Py_ffi_closure_free(void *p); | |
| 367 | 367 | void *Py_ffi_closure_alloc(size_t size, void** codeloc); | |
| 368 | 368 | #else | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -91,13 +91,13 @@ static void more_core(void) | |||
| 91 | 91 | /* put the item back into the free list */ | |
| 92 | 92 | void Py_ffi_closure_free(void *p) | |
| 93 | 93 | { | |
| 94 | - #if HAVE_FFI_CLOSURE_ALLOC | ||
| 95 | - #if USING_APPLE_OS_LIBFFI | ||
| 94 | + #ifdef HAVE_FFI_CLOSURE_ALLOC | ||
| 95 | + #ifdef USING_APPLE_OS_LIBFFI | ||
| 96 | 96 | if (__builtin_available(macos 10.15, ios 13, watchos 6, tvos 13, *)) { | |
| 97 | 97 | #endif | |
| 98 | 98 | ffi_closure_free(p); | |
| 99 | 99 | return; | |
| 100 | - #if USING_APPLE_OS_LIBFFI | ||
| 100 | + #ifdef USING_APPLE_OS_LIBFFI | ||
| 101 | 101 | } | |
| 102 | 102 | #endif | |
| 103 | 103 | #endif | |
@@ -109,12 +109,12 @@ void Py_ffi_closure_free(void *p) | |||
| 109 | 109 | /* return one item from the free list, allocating more if needed */ | |
| 110 | 110 | void *Py_ffi_closure_alloc(size_t size, void** codeloc) | |
| 111 | 111 | { | |
| 112 | - #if HAVE_FFI_CLOSURE_ALLOC | ||
| 113 | - #if USING_APPLE_OS_LIBFFI | ||
| 112 | + #ifdef HAVE_FFI_CLOSURE_ALLOC | ||
| 113 | + #ifdef USING_APPLE_OS_LIBFFI | ||
| 114 | 114 | if (__builtin_available(macos 10.15, ios 13, watchos 6, tvos 13, *)) { | |
| 115 | 115 | #endif | |
| 116 | 116 | return ffi_closure_alloc(size, codeloc); | |
| 117 | - #if USING_APPLE_OS_LIBFFI | ||
| 117 | + #ifdef USING_APPLE_OS_LIBFFI | ||
| 118 | 118 | } | |
| 119 | 119 | #endif | |
| 120 | 120 | #endif | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -297,7 +297,7 @@ static const int stepsizeTable[89] = { | |||
| 297 | 297 | #define GETINT16(cp, i) GETINTX(int16_t, (cp), (i)) | |
| 298 | 298 | #define GETINT32(cp, i) GETINTX(int32_t, (cp), (i)) | |
| 299 | 299 | ||
| 300 | - #if WORDS_BIGENDIAN | ||
| 300 | + #ifdef WORDS_BIGENDIAN | ||
| 301 | 301 | #define GETINT24(cp, i) ( \ | |
| 302 | 302 | ((unsigned char *)(cp) + (i))[2] + \ | |
| 303 | 303 | (((unsigned char *)(cp) + (i))[1] << 8) + \ | |
@@ -314,7 +314,7 @@ static const int stepsizeTable[89] = { | |||
| 314 | 314 | #define SETINT16(cp, i, val) SETINTX(int16_t, (cp), (i), (val)) | |
| 315 | 315 | #define SETINT32(cp, i, val) SETINTX(int32_t, (cp), (i), (val)) | |
| 316 | 316 | ||
| 317 | - #if WORDS_BIGENDIAN | ||
| 317 | + #ifdef WORDS_BIGENDIAN | ||
| 318 | 318 | #define SETINT24(cp, i, val) do { \ | |
| 319 | 319 | ((unsigned char *)(cp) + (i))[2] = (int)(val); \ | |
| 320 | 320 | ((unsigned char *)(cp) + (i))[1] = (int)(val) >> 8; \ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -61,7 +61,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |||
| 61 | 61 | #endif | |
| 62 | 62 | ||
| 63 | 63 | #ifdef HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION | |
| 64 | - #include "pycore_fileutils.h" // _Py_LocaleUsesNonUnicodeWchar() | ||
| 64 | + # include "pycore_fileutils.h" // _Py_LocaleUsesNonUnicodeWchar() | ||
| 65 | 65 | #endif | |
| 66 | 66 | ||
| 67 | 67 | /* Uncomment to display statistics on interned strings at exit | |
@@ -3344,7 +3344,7 @@ PyUnicode_AsWideChar(PyObject *unicode, | |||
| 3344 | 3344 | } | |
| 3345 | 3345 | unicode_copy_as_widechar(unicode, w, size); | |
| 3346 | 3346 | ||
| 3347 | - #if HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION | ||
| 3347 | + #ifdef HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION | ||
| 3348 | 3348 | /* Oracle Solaris uses non-Unicode internal wchar_t form for | |
| 3349 | 3349 | non-Unicode locales and hence needs conversion first. */ | |
| 3350 | 3350 | if (_Py_LocaleUsesNonUnicodeWchar()) { | |
@@ -3381,7 +3381,7 @@ PyUnicode_AsWideCharString(PyObject *unicode, | |||
| 3381 | 3381 | } | |
| 3382 | 3382 | unicode_copy_as_widechar(unicode, buffer, buflen + 1); | |
| 3383 | 3383 | ||
| 3384 | - #if HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION | ||
| 3384 | + #ifdef HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION | ||
| 3385 | 3385 | /* Oracle Solaris uses non-Unicode internal wchar_t form for | |
| 3386 | 3386 | non-Unicode locales and hence needs conversion first. */ | |
| 3387 | 3387 | if (_Py_LocaleUsesNonUnicodeWchar()) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -962,7 +962,7 @@ _PyTime_GetSystemClockWithInfo(_PyTime_t *t, _Py_clock_info_t *info) | |||
| 962 | 962 | } | |
| 963 | 963 | ||
| 964 | 964 | ||
| 965 | - #if __APPLE__ | ||
| 965 | + #ifdef __APPLE__ | ||
| 966 | 966 | static int | |
| 967 | 967 | py_mach_timebase_info(_PyTime_t *pnumer, _PyTime_t *pdenom, int raise) | |
| 968 | 968 | { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments