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  
    426426        PyErr_Format(PyExc_NotImplementedError, "ffi_prep_closure_loc() is missing");
    427427        goto error;
    428428#else
    429 #if defined(__clang__) || defined(MACOSX)
    430         #pragma clang diagnostic push
    431         #pragma clang diagnostic ignored "-Wdeprecated-declarations"
    432 #endif
    433 #if defined(__GNUC__)
    434         #pragma GCC diagnostic push
    435         #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
    436 #endif
    437429        result = ffi_prep_closure(p->pcl_write, &p->cif, closure_fcn, p);
    438430
    439 #if defined(__clang__) || defined(MACOSX)
    440         #pragma clang diagnostic pop
    441 #endif
    442 #if defined(__GNUC__)
    443         #pragma GCC diagnostic pop
    444 #endif
    445 
    446431#endif
    447432    }
    448433    if (result != FFI_OK) {