cairo: Store the error number in the error tuple.

db4
Doug Coleman 2012-07-10 17:24:54 -07:00
parent 18993420f2
commit a1a123c0c6
1 changed files with 2 additions and 2 deletions

View File

@ -6,11 +6,11 @@ sequences namespaces fry continuations destructors math images
images.memory math.rectangles ;
IN: cairo
ERROR: cairo-error message ;
ERROR: cairo-error n message ;
: (check-cairo) ( cairo_status_t -- )
dup CAIRO_STATUS_SUCCESS =
[ drop ] [ cairo_status_to_string cairo-error ] if ;
[ drop ] [ [ ] [ cairo_status_to_string ] bi cairo-error ] if ;
: check-cairo ( cairo -- ) cairo_status (check-cairo) ;