*pattern = *other;
switch (other->type) { case CAIRO_PATTERN_SOLID: { cairo_solid_pattern_t *dst = (cairo_solid_pattern_t *) pattern; cairo_solid_pattern_t *src = (cairo_solid_pattern_t *) other;
_cairo_pattern_init_copy (cairo_pattern_t *pattern, cairo_pattern_t *other){    *pattern = *other;    pattern->ref_count = 1;    if (pattern->n_stops) {	pattern->stops =	    malloc (sizeof (cairo_color_stop_t) * pattern->n_stops);	if (pattern->stops == NULL)	    return CAIRO_STATUS_NO_MEMORY;	memcpy (pattern->stops, other->stops,		sizeof (cairo_color_stop_t) * other->n_stops);    }    if (pattern->source)	cairo_surface_reference (other->source);    if (pattern->type == CAIRO_PATTERN_SURFACE)	cairo_surface_reference (other->u.surface.surface);        return CAIRO_STATUS_SUCCESS;}