/*
* Document-method: new
* call-seq: Iconv.new(to, from)
*
* Creates new code converter from a coding-system designated with +from+
* to another one designated with +to+.
*
* === Parameters
*
* +to+:: encoding name for destination
* +from+:: encoding name for source
*
* === Exceptions
*
* TypeError:: if +to+ or +from+ aren't String
* InvalidEncoding:: if designated converter couldn't find out
* SystemCallError:: if <tt>iconv_open(3)</tt> fails
*/
static VALUE
iconv_initialize
(self, to, from)
VALUE self;
VALUE to;
VALUE from;
{
iconv_free(check_iconv(self));
DATA_PTR(self) = NULL;
DATA_PTR(self) = (void *)ICONV2VALUE(iconv_create(to, from));
return self;
}