mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
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:
parent
d249a5e7eb
commit
c6028e15e4
@ -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];
|
||||
|
||||
|
@ -188,7 +188,7 @@ static JSExnType errorToException[] = {
|
||||
|
||||
JSBool
|
||||
js_ErrorToException(JSContext *cx, JSErrorReport *reportp) {
|
||||
uintN errorNumber;
|
||||
JSErrNum errorNumber;
|
||||
JSObject *errobj;
|
||||
JSExnType exn;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user