summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cairo-misc.c2
-rw-r--r--src/cairo-surface.c1
-rw-r--r--src/cairo.h4
-rw-r--r--src/cairoint.h2
4 files changed, 7 insertions, 2 deletions
diff --git a/src/cairo-misc.c b/src/cairo-misc.c
index 02c88737..e2b7cf77 100644
--- a/src/cairo-misc.c
+++ b/src/cairo-misc.c
@@ -107,6 +107,8 @@ cairo_status_to_string (cairo_status_t status)
return "the user-font is immutable";
case CAIRO_STATUS_USER_FONT_ERROR:
return "error occurred in a user-font callback function";
+ case CAIRO_STATUS_NEGATIVE_COUNT:
+ return "negative number used where it is not allowed";
}
return "<unknown error status>";
diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index e35cd1d8..f5a2f2f7 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -2579,6 +2579,7 @@ _cairo_surface_create_in_error (cairo_status_t status)
case CAIRO_STATUS_FONT_TYPE_MISMATCH:
case CAIRO_STATUS_USER_FONT_IMMUTABLE:
case CAIRO_STATUS_USER_FONT_ERROR:
+ case CAIRO_STATUS_NEGATIVE_COUNT:
default:
_cairo_error_throw (CAIRO_STATUS_NO_MEMORY);
return (cairo_surface_t *) &_cairo_surface_nil;
diff --git a/src/cairo.h b/src/cairo.h
index 60106972..3954159e 100644
--- a/src/cairo.h
+++ b/src/cairo.h
@@ -206,6 +206,7 @@ typedef struct _cairo_user_data_key {
* @CAIRO_STATUS_FONT_TYPE_MISMATCH: the font type is not appropriate for the operation (Since 1.8)
* @CAIRO_STATUS_USER_FONT_IMMUTABLE: the user-font is immutable (Since 1.8)
* @CAIRO_STATUS_USER_FONT_ERROR: error occurred in a user-font callback function (Since 1.8)
+ * @CAIRO_STATUS_NEGATIVE_COUNT: negative number used where it is not allowed (Since 1.8)
*
* #cairo_status_t is used to indicate errors that can occur when
* using Cairo. In some cases it is returned directly by functions.
@@ -243,7 +244,8 @@ typedef enum _cairo_status {
CAIRO_STATUS_INVALID_STRIDE,
CAIRO_STATUS_FONT_TYPE_MISMATCH,
CAIRO_STATUS_USER_FONT_IMMUTABLE,
- CAIRO_STATUS_USER_FONT_ERROR
+ CAIRO_STATUS_USER_FONT_ERROR,
+ CAIRO_STATUS_NEGATIVE_COUNT
/* after adding a new error: update CAIRO_STATUS_LAST_STATUS in cairoint.h */
} cairo_status_t;
diff --git a/src/cairoint.h b/src/cairoint.h
index e2a6d3d3..9e5c38ca 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -110,7 +110,7 @@ _cairo_win32_tmpfile (void);
* a bit of a pain, but it should be easy to always catch as long as
* one adds a new test case to test a trigger of the new status value.
*/
-#define CAIRO_STATUS_LAST_STATUS CAIRO_STATUS_USER_FONT_ERROR
+#define CAIRO_STATUS_LAST_STATUS CAIRO_STATUS_NEGATIVE_COUNT
/* Size in bytes of buffer to use off the stack per functions.