Mercurial > pidgin.yaz
diff libpurple/connection.h @ 21357:5a3242b676ad
rlaager suggested using the last element of the PurpleDisconnectReason enum
for sanity checking, which sidesteps the "should NUM_REASONS be in or out of
the enum?" problem.
author | Will Thompson <will.thompson@collabora.co.uk> |
---|---|
date | Sun, 14 Oct 2007 12:19:20 +0000 |
parents | c521b0f72a7b |
children | ba41f2a60253 |
line wrap: on
line diff
--- a/libpurple/connection.h Sat Oct 13 00:23:52 2007 +0000 +++ b/libpurple/connection.h Sun Oct 14 12:19:20 2007 +0000 @@ -119,12 +119,13 @@ /** Some other error occured which fits into none of the other * categories. */ + /* purple_connection_error_reason() in connection.c uses the fact that + * this is the last member of the enum when sanity-checking; if other + * reasons are added after it, the check must be updated. + */ PURPLE_REASON_OTHER_ERROR = 15 } PurpleDisconnectReason; -/** 1 more than the value of the last #PurpleDisconnectReason. */ -#define PURPLE_NUM_REASONS 16 - #include <time.h> #include "account.h"