Made the enum JSErrNum into a typedef

enum JSErrNum, and changed a uintN
errorNumber declaration to JSErrNum.

It'd be nice to change the uintN
errorNumber field in JSErrorReport to
JSErrNum, but it's not clear that
JSErrNum is or should be exposed in the
API.  Any C esthetes want to offer their
opinions?

It made my debugger slightly happier.
This commit is contained in:
mccabe%netscape.com 1998-08-31 07:07:26 +00:00
parent d249a5e7eb
commit c6028e15e4
2 changed files with 3 additions and 3 deletions

View File

@ -209,14 +209,14 @@ js_ReportErrorAgain(JSContext *cx, const char *message, JSErrorReport *report);
extern void
js_ReportIsNotDefined(JSContext *cx, const char *name);
enum JSErrNum {
typedef enum JSErrNum {
#define MSG_DEF(name, number, count, exception, format) \
name = number,
#include "jsmsg.def"
#undef MSG_DEF
JSErr_Limit
#undef MSGDEF
};
} JSErrNum;
extern JSErrorFormatString js_ErrorFormatString[JSErr_Limit];

View File

@ -188,7 +188,7 @@ static JSExnType errorToException[] = {
JSBool
js_ErrorToException(JSContext *cx, JSErrorReport *reportp) {
uintN errorNumber;
JSErrNum errorNumber;
JSObject *errobj;
JSExnType exn;