Permalink
Browse files

make RBX compatible

  • Loading branch information...
1 parent 3503301 commit 1f105d3787d04f6e025a72281b249d1a5656e9d5 @tlewin tlewin committed Oct 16, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 ext/iconv/iconv.c
View
@@ -219,10 +219,11 @@ map_charset(VALUE *code)
VALUE val = StringValue(*code);
if (RHASH_SIZE(charset_map)) {
- st_data_t data;
+ VALUE data;
VALUE key = rb_funcall2(val, rb_intern("downcase"), 0, 0);
StringValuePtr(key);
- if (st_lookup(RHASH_TBL(charset_map), key, &data)) {
+ data = rb_hash_aref(charset_map, key);
+ if(!NIL_P(data)) {
*code = (VALUE)data;
}
}

0 comments on commit 1f105d3

Please sign in to comment.