From: Sam Thursfield Date: Thu, 7 Jul 2011 10:42:04 +0000 (+0100) Subject: Avoid enum portability issues X-Git-Tag: 0.7.1~199^2~18 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=moonshot-ui.git;a=commitdiff_plain;h=02b179dd71b9904c79a739da916cb747aee8ba42 Avoid enum portability issues Use 'int' instead of MoonshotErrorCode in struct MoonshotError, because the size of an enum value is technically unspecified. --- diff --git a/libmoonshot/libmoonshot.h b/libmoonshot/libmoonshot.h index 86e6a80..a324d61 100644 --- a/libmoonshot/libmoonshot.h +++ b/libmoonshot/libmoonshot.h @@ -55,8 +55,8 @@ typedef enum { } MoonshotErrorCode; typedef struct { - MoonshotErrorCode code; - char *message; + int code; /* A MoonshotErrorCode */ + char *message; } MoonshotError; /**