From 322f2e1b8132e4f1013581793280a91c7b376282 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 4 Apr 2015 16:46:07 +0200 Subject: [PATCH] Document failure scenarios for *_new() Signed-off-by: Uli Schlachter --- src/xcb_errors.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xcb_errors.h b/src/xcb_errors.h index 177b04c..757fd4a 100644 --- a/src/xcb_errors.h +++ b/src/xcb_errors.h @@ -49,7 +49,8 @@ typedef struct xcb_errors_context_t xcb_errors_context_t; * with @ref xcb_errors_context_free (). * @param ctx A pointer to an xcb_cursor_context_t* which will be modified to * refer to the newly created context. - * @return 0 on success, some other value otherwise. + * @return 0 on success, -1 otherwise. This function may fail due to memory + * allocation failures or if the connection ends up in an error state. */ int xcb_errors_context_new(xcb_connection_t *conn, xcb_errors_context_t **ctx);