support copy slice with ptr struct