static VALUE
rc_strdup(VALUE obj, VALUE str_in)
{
    VALUE str_out;
    char *c, *d;

    
    c = StringValueCStr(str_in);

    
    d = strdup(c);
    if (d == NULL)
	rb_sys_fail(NULL);

    
    str_out = rb_str_new_cstr(d);
    free(d);
    return str_out;
}

void
Init_rc_strdup(void)
{
    VALUE mRosettaCode = rb_define_module();
    rb_define_module_function(mRosettaCode, , rc_strdup, 1);
}