Ticket #62506: python39-ctypes-fix-gcc-no-pragmas-in-functions.diff
File python39-ctypes-fix-gcc-no-pragmas-in-functions.diff, 852 bytes (added by kencu (Ken), 4 years ago) |
---|
-
Modules/_ctypes/callbacks.c
old new 426 426 PyErr_Format(PyExc_NotImplementedError, "ffi_prep_closure_loc() is missing"); 427 427 goto error; 428 428 #else 429 #if defined(__clang__) || defined(MACOSX)430 #pragma clang diagnostic push431 #pragma clang diagnostic ignored "-Wdeprecated-declarations"432 #endif433 #if defined(__GNUC__)434 #pragma GCC diagnostic push435 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"436 #endif437 429 result = ffi_prep_closure(p->pcl_write, &p->cif, closure_fcn, p); 438 430 439 #if defined(__clang__) || defined(MACOSX)440 #pragma clang diagnostic pop441 #endif442 #if defined(__GNUC__)443 #pragma GCC diagnostic pop444 #endif445 446 431 #endif 447 432 } 448 433 if (result != FFI_OK) {