Bug 377754: fixing JS_CLASS_TRACE macro and misspellings. r=brendan

This commit is contained in:
igor@mir2.org 2007-04-17 14:14:18 -07:00
Родитель 40b93f981a
Коммит 4608a27b1b
2 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -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))
/*

Просмотреть файл

@ -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))