@@ -54,14 +54,6 @@ Interrupt and signal handling for Cython
54
54
#include <sys/prctl.h>
55
55
#endif
56
56
#include <Python.h>
57
- #if HAVE_PARI
58
- #include <pari/pari.h>
59
- #else
60
- /* Fake PARI variables */
61
- static int PARI_SIGINT_block = 0 ;
62
- static int PARI_SIGINT_pending = 0 ;
63
- #define paricfg_version NULL
64
- #endif
65
57
66
58
// Custom signal handling of other packages.
67
59
#define MAX_N_CUSTOM_HANDLERS 16
@@ -94,8 +86,6 @@ void custom_set_pending_signal(int sig){
94
86
}
95
87
96
88
#if HAVE_WINDOWS_H
97
- /* We must include <windows.h> after <pari.h>
98
- * See https://github.com/sagemath/cysignals/issues/107 */
99
89
#include <windows.h>
100
90
#endif
101
91
#include "struct_signals.h"
@@ -295,7 +285,7 @@ static void cysigs_interrupt_handler(int sig)
295
285
296
286
if (cysigs .sig_on_count > 0 )
297
287
{
298
- if (!cysigs .block_sigint && !PARI_SIGINT_block && ! custom_signal_is_blocked ())
288
+ if (!cysigs .block_sigint && !custom_signal_is_blocked ())
299
289
{
300
290
/* Raise an exception so Python can see it */
301
291
do_raise_exception (sig );
@@ -318,7 +308,6 @@ static void cysigs_interrupt_handler(int sig)
318
308
if (cysigs .interrupt_received != SIGHUP && cysigs .interrupt_received != SIGTERM )
319
309
{
320
310
cysigs .interrupt_received = sig ;
321
- PARI_SIGINT_pending = sig ;
322
311
custom_set_pending_signal (sig );
323
312
}
324
313
}
@@ -486,7 +475,6 @@ static void _sig_on_interrupt_received(void)
486
475
do_raise_exception (cysigs .interrupt_received );
487
476
cysigs .sig_on_count = 0 ;
488
477
cysigs .interrupt_received = 0 ;
489
- PARI_SIGINT_pending = 0 ;
490
478
custom_signal_unblock ();
491
479
492
480
#if HAVE_SIGPROCMASK
@@ -499,11 +487,9 @@ static void _sig_on_interrupt_received(void)
499
487
static void _sig_on_recover (void )
500
488
{
501
489
cysigs .block_sigint = 0 ;
502
- PARI_SIGINT_block = 0 ;
503
490
custom_signal_unblock ();
504
491
cysigs .sig_on_count = 0 ;
505
492
cysigs .interrupt_received = 0 ;
506
- PARI_SIGINT_pending = 0 ;
507
493
custom_set_pending_signal (0 );
508
494
509
495
#if HAVE_SIGPROCMASK
0 commit comments