/* This is called by #initialize_copy and is using for duping/cloning. */
VALUE
rb_ldap_control_copy (VALUE copy, VALUE orig)
{
  LDAPControl *orig_ctl, *copy_ctl;

  Data_Get_Struct (orig, LDAPControl, orig_ctl);
  Data_Get_Struct (copy, LDAPControl, copy_ctl);
  memcpy (copy_ctl, orig_ctl, (size_t) sizeof (LDAPControl));

  return copy;
}