Permalink
Browse files

Better C implementation for Iconv

 - Based off Ruby19 trunk
 - Fixes #66 and #825



git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4416 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information...
Thibault Martin-Lagardette
Thibault Martin-Lagardette committed Aug 9, 2010
1 parent 164bb08 commit ee2152ef43c0ecf340763a77811eb76b33e9a106
View
@@ -516,6 +516,15 @@ rb_enc_get_index(VALUE obj)
return index_of_encoding(rb_enc_get(obj));
}
+void
+rb_enc_set_index(VALUE obj, int encindex)
+{
+ if (encindex < ENCODINGS_COUNT) {
+ return ;
+ }
+ rb_str_force_encoding(obj, rb_encodings[encindex]);
+}
+
int
rb_to_encoding_index(VALUE enc)
{
View
@@ -42,6 +42,7 @@
end
$cleanfiles << wrapper
end
+ $INCFLAGS << ' -I../..'
create_makefile("iconv")
if conf
open("Makefile", "a") do |mf|
Oops, something went wrong.

0 comments on commit ee2152e

Please sign in to comment.