From 4608a27b1b2847fb5b83e7d8c85db79032fa2f7c Mon Sep 17 00:00:00 2001 From: "igor@mir2.org" Date: Tue, 17 Apr 2007 14:14:18 -0700 Subject: [PATCH] Bug 377754: fixing JS_CLASS_TRACE macro and misspellings. r=brendan --- js/src/jsapi.h | 4 ++-- js/src/jspubtd.h | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/js/src/jsapi.h b/js/src/jsapi.h index b9cd7bd9ae2..507a7b78874 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -905,7 +905,7 @@ struct JSTracer { * The method to call on each reference to a traceable thing storted in a * particular JSObject or other runtime structure. With DEBUG defined the * caller before calling JS_CallTracer must initialize JSTracer fields - * describing the reference using the macros bellow. + * describing the reference using the macros below. */ extern JS_PUBLIC_API(void) JS_CallTracer(JSTracer *trc, void *thing, uint32 kind); @@ -1183,7 +1183,7 @@ struct JSExtendedClass { #define JSCLASS_IS_ANONYMOUS (1<<(JSCLASS_HIGH_FLAGS_SHIFT+1)) #define JSCLASS_IS_GLOBAL (1<<(JSCLASS_HIGH_FLAGS_SHIFT+2)) -/* Idicates that JSClass.mark is a tracer with JSTraceOp type. */ +/* Indicates that JSClass.mark is a tracer with JSTraceOp type. */ #define JSCLASS_MARK_IS_TRACE (1<<(JSCLASS_HIGH_FLAGS_SHIFT+3)) /* diff --git a/js/src/jspubtd.h b/js/src/jspubtd.h index 8ee1e428af1..98b7c669c93 100644 --- a/js/src/jspubtd.h +++ b/js/src/jspubtd.h @@ -356,19 +356,19 @@ typedef uint32 * * To define the tracer for a JSClass, the implementation must add * JSCLASS_MARK_IS_TRACE to class flags and use JS_CLASS_TRACE(method) - * macro bellow to convert JSTraceOp to JSMarkOp when initializing or + * macro below to convert JSTraceOp to JSMarkOp when initializing or * assigning JSClass.mark field. */ typedef void (* JS_DLL_CALLBACK JSTraceOp)(JSTracer *trc, JSObject *obj); -#if defined __GNUC__ && __GNUC__ >= 4 +#if defined __GNUC__ && __GNUC__ >= 4 && !defined __cplusplus # define JS_CLASS_TRACE(method) \ - (__builtin_types_compatible_p(JSTraceOp, __typeof(&method)) \ + (__builtin_types_compatible_p(JSTraceOp, __typeof(&(method))) \ ? (JSMarkOp)(method) \ - : JS_WrongTypeForClassTacer) + : js_WrongTypeForClassTracer) -extern JSMarkOp JS_WrongTypeForClassTacer; +extern JSMarkOp js_WrongTypeForClassTracer; #else # define JS_CLASS_TRACE(method) ((JSMarkOp)(method))