summaryrefslogtreecommitdiff
path: root/ext/-test-/econv/append.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/-test-/econv/append.c')
-rw-r--r--ext/-test-/econv/append.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/-test-/econv/append.c b/ext/-test-/econv/append.c
new file mode 100644
index 0000000000..724cd136c0
--- /dev/null
+++ b/ext/-test-/econv/append.c
@@ -0,0 +1,15 @@
+#include "ruby/ruby.h"
+#include "ruby/encoding.h"
+
+static VALUE
+econv_append(VALUE self, VALUE src, VALUE dst)
+{
+ rb_econv_t *ec = DATA_PTR(self);
+ return rb_econv_str_append(ec, src, dst, 0);
+}
+
+void
+Init_econv_append(VALUE klass)
+{
+ rb_define_method(klass, "append", econv_append, 2);
+}