diff options
-rw-r--r-- | doc/public/tmpl/cairo-status.sgml | 1 | ||||
-rw-r--r-- | doc/public/tmpl/cairo-user-fonts.sgml | 2 | ||||
-rw-r--r-- | src/cairo-misc.c | 2 | ||||
-rw-r--r-- | src/cairo-surface.c | 1 | ||||
-rw-r--r-- | src/cairo.h | 4 | ||||
-rw-r--r-- | src/cairoint.h | 2 |
6 files changed, 8 insertions, 4 deletions
diff --git a/doc/public/tmpl/cairo-status.sgml b/doc/public/tmpl/cairo-status.sgml index 143ce81e..f88befee 100644 --- a/doc/public/tmpl/cairo-status.sgml +++ b/doc/public/tmpl/cairo-status.sgml @@ -66,6 +66,7 @@ code is required before or after each individual cairo function call. @CAIRO_STATUS_FONT_TYPE_MISMATCH: @CAIRO_STATUS_USER_FONT_IMMUTABLE: @CAIRO_STATUS_USER_FONT_ERROR: +@CAIRO_STATUS_NEGATIVE_COUNT: <!-- ##### FUNCTION cairo_status_to_string ##### --> <para> diff --git a/doc/public/tmpl/cairo-user-fonts.sgml b/doc/public/tmpl/cairo-user-fonts.sgml index 64f75019..1a9322a9 100644 --- a/doc/public/tmpl/cairo-user-fonts.sgml +++ b/doc/public/tmpl/cairo-user-fonts.sgml @@ -9,13 +9,11 @@ User Fonts </para> - <!-- ##### SECTION See_Also ##### --> <para> </para> - <!-- ##### SECTION Stability_Level ##### --> 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. |