Subj : Re: js_GetSlotThreadSafe problems To : netscape.public.mozilla.jseng From : Mike Moening Date : Thu Mar 17 2005 12:19 pm Could you fix the JSVAL_IS_FUNCTION macro so it doesn't suck in non-public stuff? Patch the following: #define JSVAL_IS_FUNCTION(cx, v) \ (JSVAL_IS_OBJECT(v) && JSVAL_TO_OBJECT(v) && \ OBJ_GET_CLASS(cx, JSVAL_TO_OBJECT(v)) == &js_FunctionClass) To This: #define JSVAL_IS_FUNCTION(cx, v) \ (JSVAL_IS_OBJECT(v) && JSVAL_TO_OBJECT(v) && \ JS_GET_CLASS(cx, JSVAL_TO_OBJECT(v)) == &js_FunctionClass) "Mike Moening" wrote in message news:d1chi2$7qo1@ripley.netscape.com... > Looks like the macro JSVAL_IS_FUNCTION also brings in OBJ_GET_CLASS. > Is there a public equivalent? > > Again thank you much for your time! > > "Mike Moening" wrote in message > news:d1chdl$dmv2@ripley.netscape.com... > > I changed it to read like this: > > JS_snprintf(buf, sizeof buf, "[object %s]", > > JS_GET_CLASS(pJSContext, JSVAL_TO_OBJECT(v))->name); > > > > Still the same linker error. Something else is suckin it in yet... > > > > "Brendan Eich" wrote in message > > news:4239C7D0.3010702@meer.net... > > > Mike Moening wrote: > > > > > > > JS_snprintf(buf, sizeof buf, "[object %s]", > > > > OBJ_GET_CLASS(pJSContext, JSVAL_TO_OBJECT(v))->name); > > > > > > OBJ_GET_CLASS calls OBJ_GET_SLOT. > > > > > > Please don't include private headers if you can help it. Above, you > > > could use JS_GET_CLASS instead, which is public API. > > > > > > /be > > > > > > .