diff options
Diffstat (limited to 'ext/-test-/econv/append.c')
| -rw-r--r-- | ext/-test-/econv/append.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ext/-test-/econv/append.c b/ext/-test-/econv/append.c new file mode 100644 index 0000000000..eb473c47a3 --- /dev/null +++ b/ext/-test-/econv/append.c @@ -0,0 +1,17 @@ +#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); + StringValue(src); + StringValue(dst); + return rb_econv_str_append(ec, src, dst, 0); +} + +void +Init_econv_append(VALUE klass) +{ + rb_define_method(klass, "append", econv_append, 2); +} |
