diff options
author | Eric Wong <e@80x24.org> | 2017-01-05 00:49:02 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2017-01-05 08:39:07 +0000 |
commit | 56c4eb8a98957da88ef8efd42c6e39eaf0a1b69d (patch) | |
tree | 087aebe4bd96b3b997b07f78cafc6d430ffd9eae /lib/sleepy_penguin.rb | |
parent | 1b355863e42164110a074a9313966ffebf880fb7 (diff) | |
download | sleepy_penguin-56c4eb8a98957da88ef8efd42c6e39eaf0a1b69d.tar.gz |
Keyword args allows for a smaller interface for common use, while retaining the capability to use offsets for both input and output. The current (2.4) Ruby C API for keyword args is slow and creates too many garbage objects. As with our splice wrapper, use a pure Ruby wrapper around an internal C function.
Diffstat (limited to 'lib/sleepy_penguin.rb')
-rw-r--r-- | lib/sleepy_penguin.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sleepy_penguin.rb b/lib/sleepy_penguin.rb index 63f293d..07c431b 100644 --- a/lib/sleepy_penguin.rb +++ b/lib/sleepy_penguin.rb @@ -16,6 +16,7 @@ if defined?(SleepyPenguin::Inotify) && end end -if SleepyPenguin.respond_to?(:__splice) || SleepyPenguin.respond_to?(:__tee) - require_relative 'sleepy_penguin/splice' +module SleepyPenguin + require_relative 'sleepy_penguin/splice' if respond_to?(:__splice) + require_relative 'sleepy_penguin/cfr' if respond_to?(:__cfr) end |