mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
fix for bug 12237 - add a flag in typelib to indicate methods thatare not xpcom compliant. Stealing bit that was originally intended for varargs
This commit is contained in:
parent
e6693b5ce4
commit
e4d792bba4
@ -167,7 +167,7 @@ public:
|
||||
|
||||
PRBool IsGetter() const {return (PRBool) (XPT_MD_IS_GETTER(flags) );}
|
||||
PRBool IsSetter() const {return (PRBool) (XPT_MD_IS_SETTER(flags) );}
|
||||
PRBool IsVarArgs() const {return (PRBool) (XPT_MD_IS_VARARGS(flags));}
|
||||
PRBool IsNotXPCOM() const {return (PRBool) (XPT_MD_IS_NOTXPCOM(flags));}
|
||||
PRBool IsConstructor() const {return (PRBool) (XPT_MD_IS_CTOR(flags) );}
|
||||
PRBool IsHidden() const {return (PRBool) (XPT_MD_IS_HIDDEN(flags) );}
|
||||
const char* GetName() const {return name;}
|
||||
|
@ -877,10 +877,14 @@ typelib_op_dcl(TreeState *state)
|
||||
if (op->op_type_spec && !op_notxpcom)
|
||||
num_args++; /* fake param for _retval */
|
||||
|
||||
if (op_noscript || op_notxpcom)
|
||||
if (op_noscript)
|
||||
op_flags |= XPT_MD_HIDDEN;
|
||||
if (op_notxpcom)
|
||||
op_flags |= XPT_MD_NOTXPCOM;
|
||||
/*
|
||||
if (op->f_varargs)
|
||||
op_flags |= XPT_MD_VARARGS;
|
||||
*/
|
||||
/* XXXshaver constructor? */
|
||||
|
||||
#ifdef DEBUG_shaver_method
|
||||
|
@ -239,7 +239,7 @@ XPT_NewStringZ(char *bytes);
|
||||
* InterfaceIsTypeDescriptor.
|
||||
*/
|
||||
|
||||
/* XXX why bother with a struct? */
|
||||
/* why bother with a struct? - other code relies on this being a struct */
|
||||
struct XPTTypeDescriptorPrefix {
|
||||
PRUint8 flags;
|
||||
};
|
||||
@ -382,14 +382,14 @@ struct XPTMethodDescriptor {
|
||||
/* flag bits -- jband and fur were right, and I was miserably wrong */
|
||||
#define XPT_MD_GETTER 0x80
|
||||
#define XPT_MD_SETTER 0x40
|
||||
#define XPT_MD_VARARGS 0x20
|
||||
#define XPT_MD_NOTXPCOM 0x20
|
||||
#define XPT_MD_CTOR 0x10
|
||||
#define XPT_MD_HIDDEN 0x08
|
||||
#define XPT_MD_FLAGMASK 0xf8
|
||||
|
||||
#define XPT_MD_IS_GETTER(flags) (flags & XPT_MD_GETTER)
|
||||
#define XPT_MD_IS_SETTER(flags) (flags & XPT_MD_SETTER)
|
||||
#define XPT_MD_IS_VARARGS(flags) (flags & XPT_MD_VARARGS)
|
||||
#define XPT_MD_IS_NOTXPCOM(flags) (flags & XPT_MD_NOTXPCOM)
|
||||
#define XPT_MD_IS_CTOR(flags) (flags & XPT_MD_CTOR)
|
||||
#define XPT_MD_IS_HIDDEN(flags) (flags & XPT_MD_HIDDEN)
|
||||
|
||||
|
@ -534,8 +534,8 @@ XPT_DumpMethodDescriptor(XPTHeader *header, XPTMethodDescriptor *md,
|
||||
else
|
||||
fprintf(stdout, "FALSE\n");
|
||||
|
||||
fprintf(stdout, "%*sIs Varargs? ", indent, " ");
|
||||
if (XPT_MD_IS_VARARGS(md->flags))
|
||||
fprintf(stdout, "%*sIs NotXPCOM? ", indent, " ");
|
||||
if (XPT_MD_IS_NOTXPCOM(md->flags))
|
||||
fprintf(stdout, "TRUE\n");
|
||||
else
|
||||
fprintf(stdout, "FALSE\n");
|
||||
@ -579,7 +579,7 @@ XPT_DumpMethodDescriptor(XPTHeader *header, XPTMethodDescriptor *md,
|
||||
XPT_MD_IS_GETTER(md->flags) ? 'G' : ' ',
|
||||
XPT_MD_IS_SETTER(md->flags) ? 'S' : ' ',
|
||||
XPT_MD_IS_HIDDEN(md->flags) ? 'H' : ' ',
|
||||
XPT_MD_IS_VARARGS(md->flags) ? 'V' : ' ',
|
||||
XPT_MD_IS_NOTXPCOM(md->flags) ? 'N' : ' ',
|
||||
XPT_MD_IS_CTOR(md->flags) ? 'C' : ' ',
|
||||
param_type, md->name);
|
||||
for (i=0; i<md->num_args; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user