about summary refs log tree commit homepage
path: root/ext/unicorn_http/extconf.rb
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-05-29 05:59:27 +0000
committerEric Wong <e@80x24.org>2015-05-29 05:59:27 +0000
commit32fefc5742d1646d63a119b281baefcac551dfec (patch)
tree41b25363661184ad338666ea978ab31f9f2992f1 /ext/unicorn_http/extconf.rb
parent3f0b69e8557875eeb98e1eaeb097bf3607fa8e69 (diff)
downloadunicorn-32fefc5742d1646d63a119b281baefcac551dfec.tar.gz
Calling the function directly avoids the overhead of Ruby method
table lookup and global method cache.  The only downside is this is
now hidden from tracers and cannot be overridden from Ruby, but I
doubt anybody cares about that.
Diffstat (limited to 'ext/unicorn_http/extconf.rb')
-rw-r--r--ext/unicorn_http/extconf.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/unicorn_http/extconf.rb b/ext/unicorn_http/extconf.rb
index 7a1b0cd..1da0282 100644
--- a/ext/unicorn_http/extconf.rb
+++ b/ext/unicorn_http/extconf.rb
@@ -5,6 +5,7 @@ have_macro("SIZEOF_OFF_T", "ruby.h") or check_sizeof("off_t", "sys/types.h")
 have_macro("SIZEOF_SIZE_T", "ruby.h") or check_sizeof("size_t", "sys/types.h")
 have_macro("SIZEOF_LONG", "ruby.h") or check_sizeof("long", "sys/types.h")
 have_func("rb_str_set_len", "ruby.h")
+have_func("rb_hash_clear", "ruby.h") # Ruby 2.0+
 have_func("gmtime_r", "time.h")
 
 create_makefile("unicorn_http")