From f8dd3e5c6e2485ca4dc6fe1ef6339047ac2a2957 Mon Sep 17 00:00:00 2001 From: Tom Feist Date: Fri, 8 Jul 2011 10:30:52 +0100 Subject: add patches for removing totally, or reducing to 1ms, the Irssi::timeout_add minimum bound --- patches/reduce-timeout-bound.diff | 24 ++++++++++++++++++++++++ patches/remove-timeout-bound.diff | 30 ++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 patches/reduce-timeout-bound.diff create mode 100644 patches/remove-timeout-bound.diff diff --git a/patches/reduce-timeout-bound.diff b/patches/reduce-timeout-bound.diff new file mode 100644 index 0000000..4afc541 --- /dev/null +++ b/patches/reduce-timeout-bound.diff @@ -0,0 +1,24 @@ +--- a/src/perl/common/Core.xs ++++ b/src/perl/common/Core.xs +@@ -237,8 +237,8 @@ timeout_add(msecs, func, data) + SV *func + SV *data + CODE: +- if (msecs < 10) { +- croak("Irssi::timeout() : msecs must be >= 10"); ++ if (msecs < 1) { ++ croak("Irssi::timeout() : msecs must be >= 1"); + RETVAL = -1; + } else { + RETVAL = perl_timeout_add(msecs, func, data, FALSE); +@@ -252,8 +252,8 @@ timeout_add_once(msecs, func, data) + SV *func + SV *data + CODE: +- if (msecs < 10) { +- croak("Irssi::timeout_once() : msecs must be >= 10"); ++ if (msecs < 1) { ++ croak("Irssi::timeout_once() : msecs must be >= 1"); + RETVAL = -1; + } else { + RETVAL = perl_timeout_add(msecs, func, data, TRUE); diff --git a/patches/remove-timeout-bound.diff b/patches/remove-timeout-bound.diff new file mode 100644 index 0000000..df872a1 --- /dev/null +++ b/patches/remove-timeout-bound.diff @@ -0,0 +1,30 @@ +--- a/src/perl/common/Core.xs ++++ b/src/perl/common/Core.xs +@@ -237,12 +237,7 @@ timeout_add(msecs, func, data) + SV *func + SV *data + CODE: +- if (msecs < 10) { +- croak("Irssi::timeout() : msecs must be >= 10"); +- RETVAL = -1; +- } else { +- RETVAL = perl_timeout_add(msecs, func, data, FALSE); +- } ++ RETVAL = perl_timeout_add(msecs, func, data, FALSE); + OUTPUT: + RETVAL + +@@ -252,12 +247,7 @@ timeout_add_once(msecs, func, data) + SV *func + SV *data + CODE: +- if (msecs < 10) { +- croak("Irssi::timeout_once() : msecs must be >= 10"); +- RETVAL = -1; +- } else { +- RETVAL = perl_timeout_add(msecs, func, data, TRUE); +- } ++ RETVAL = perl_timeout_add(msecs, func, data, TRUE); + OUTPUT: + RETVAL + -- cgit v1.2.3