diff options
author | nulano <nulano@nulano.eu> | 2020-08-10 02:39:21 +0200 |
---|---|---|
committer | nulano <nulano@nulano.eu> | 2020-08-10 02:39:21 +0200 |
commit | d0d85bf5cb838e3d87a562f0d73e38369bb89ccb (patch) | |
tree | b7a541f9823984b09f1970b2e6de3f4e445ce7ac /rpython/translator/c | |
parent | fix rffi.LONG / rffi.ULONG vs rffi.SIGNED / rffi.UNSIGNED in _pypyjson module (diff) | |
parent | update contributors list, 8 new names (diff) | |
download | pypy-d0d85bf5cb838e3d87a562f0d73e38369bb89ccb.tar.gz pypy-d0d85bf5cb838e3d87a562f0d73e38369bb89ccb.tar.bz2 pypy-d0d85bf5cb838e3d87a562f0d73e38369bb89ccb.zip |
Merge default
Diffstat (limited to 'rpython/translator/c')
-rw-r--r-- | rpython/translator/c/src/signals.c | 10 | ||||
-rw-r--r-- | rpython/translator/c/src/stack.h | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/rpython/translator/c/src/signals.c b/rpython/translator/c/src/signals.c index ec0911accd..1dbd0f3786 100644 --- a/rpython/translator/c/src/signals.c +++ b/rpython/translator/c/src/signals.c @@ -116,6 +116,11 @@ static void write_str(int fd, const char *p) res = write(fd, p, i); } +#ifdef _WIN32 +/* this is set manually from pypy3's module/time/interp_time */ +HANDLE pypy_sigint_interrupt_event = NULL; +#endif + static void signal_setflag_handler(int signum) { pypysig_pushback(signum); @@ -154,6 +159,11 @@ static void signal_setflag_handler(int signum) } errno = old_errno; } + +#ifdef _WIN32 + if (signum == SIGINT && pypy_sigint_interrupt_event) + SetEvent(pypy_sigint_interrupt_event); +#endif } void pypysig_setflag(int signum) diff --git a/rpython/translator/c/src/stack.h b/rpython/translator/c/src/stack.h index 52cfc9a35b..0af1eaa47c 100644 --- a/rpython/translator/c/src/stack.h +++ b/rpython/translator/c/src/stack.h @@ -45,6 +45,8 @@ void LL_stack_set_length_fraction(double); #ifdef __GNUC__ # define PYPY_INHIBIT_TAIL_CALL() asm("/* inhibit_tail_call */") +#elif defined(_MSC_VER ) +# define PYPY_INHIBIT_TAIL_CALL() __asm NOP /* inhibit_tail_call */ #else # define PYPY_INHIBIT_TAIL_CALL() /* add hints for other compilers here */ #endif |