mirror of
https://github.com/weechat/weechat.git
synced 2026-06-29 06:16:40 +02:00
Fix compilation of Ruby plugin with ruby <= 1.8.6 (bug #30967)
This commit is contained in:
@@ -177,7 +177,13 @@ weechat_ruby_hash_to_hashtable (VALUE hash, int hashtable_size)
|
||||
if (!hashtable)
|
||||
return NULL;
|
||||
|
||||
/* RHASH_TBL exists in ruby 1.8.7 but not ruby 1.8.6 */
|
||||
#ifdef RHASH_TBL
|
||||
st = RHASH_TBL(hash);
|
||||
#else
|
||||
st = RHASH(hash)->tbl;
|
||||
#endif
|
||||
|
||||
rb_hash_foreach (hash, &weechat_ruby_hash_foreach_cb, (unsigned long)hashtable);
|
||||
|
||||
return hashtable;
|
||||
|
||||
Reference in New Issue
Block a user