]> git.imager.perl.org - imager.git/blobdiff - error.c
pick up im_ prefix functions too
[imager.git] / error.c
diff --git a/error.c b/error.c
index c234147ca9012b1e9f5ea4150925aea51b8f3c0f..03f5bef8629e0d3fe1ba1cdc1b53d24c6cfc9b7a 100644 (file)
--- a/error.c
+++ b/error.c
@@ -150,21 +150,21 @@ i_failed_cb i_set_failed_cb(i_failed_cb cb) {
 #endif
 
 /*
-=item i_errors()
+=item im_errors(ctx)
+=synopsis i_errmsg *errors = im_errors(aIMCTX);
+=synopsis i_errmsg *errors = i_errors();
 
 Returns a pointer to the first element of an array of error messages,
 terminated by a NULL pointer.  The highest level message is first.
 
+Also callable as C<i_errors()>.
+
 =cut
 */
 i_errmsg *im_errors(im_context_t ctx) {
   return ctx->error_stack + ctx->error_sp;
 }
 
-i_errmsg *i_errors(void) {
-  return im_errors(im_get_context());
-}
-
 /*
 =back
 
@@ -205,11 +205,6 @@ im_clear_error(im_context_t ctx) {
   ctx->error_sp = IM_ERROR_COUNT-1;
 }
 
-void
-i_clear_error(void) {
-  im_clear_error(im_get_context());
-}
-
 /*
 =item i_push_error(int code, char const *msg)
 =synopsis i_push_error(0, "Yep, it's broken");
@@ -247,11 +242,15 @@ im_push_error(im_context_t ctx, int code, char const *msg) {
   ctx->error_stack[ctx->error_sp].code = code;
 }
 
+#if 0
+
 void
 i_push_error(int code, char const *msg) {
   im_push_error(im_get_context(), code, msg);
 }
 
+#endif
+
 /*
 =item i_push_errorvf(int C<code>, char const *C<fmt>, va_list C<ap>)
 
@@ -282,7 +281,7 @@ im_push_errorvf(im_context_t ctx, int code, char const *fmt, va_list ap) {
 }
 
 void
-i_push_errorvf(int code, char const *fmt, va_list ap) {
+(i_push_errorvf)(int code, char const *fmt, va_list ap) {
   im_push_errorvf(im_get_context(), code, fmt, ap);
 }