unit = csurface:GetDocumentUnit()
If the surface passed as an argument is not an SVG surface, the function sets the error status to #CAIRO_STATUS_SURFACE_TYPE_MISMATCH and returns #CAIRO_SVG_UNIT_USER.
#CAIRO_STATUS_SURFACE_TYPE_MISMATCH
#CAIRO_SVG_UNIT_USER