pattern = malloc (sizeof (cairo_pattern_t));
pattern = malloc (sizeof (cairo_surface_pattern_t));
cairo_pattern_create_for_surface (cairo_surface_t *surface){    cairo_pattern_t *pattern;    pattern = malloc (sizeof (cairo_pattern_t));    if (pattern == NULL)	return NULL;    _cairo_pattern_init (pattern);        pattern->type = CAIRO_PATTERN_SURFACE;    pattern->u.surface.surface = surface;    cairo_surface_reference (surface);    return pattern;}